Module: ActiveRecord::Has::MuckProfile::ClassMethods
- Defined in:
- lib/active_record/has/muck_profile.rb
Instance Method Summary collapse
Instance Method Details
#has_muck_profile ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/active_record/has/muck_profile.rb', line 10 def has_muck_profile has_one :profile, :dependent => :destroy accepts_nested_attributes_for :profile, :allow_destroy => true after_create {|user| user.create_profile() unless user.profile} delegate :photo, :to => :profile include ActiveRecord::Has::MuckProfile::InstanceMethods extend ActiveRecord::Has::MuckProfile::SingletonMethods end |