# Ruby on Rails authentication with Devise
[[Ruby on Rails]]
## Creating users with an associated model
```ruby
class User < ActiveRecord::Base
has_one :profile, dependent: :destroy
after_create :init_profile
def init_profile
self.create_profile!
end
end
```