Could you tell me whats the best practice to create has_one relations?
f.e. if i have a user model, and it must have a profile...
How could i accomplish that?
One solution would be:
# user.rb
class User << ActiveRecord::Base
after_create :set_default_association
def set_default_association
self.create_profile
end
end
But that doesnt seem very clean... Any suggests?