Sha256: 24040c90136d890e5b3864d668a3a8ce5dd3b4b1e2e646283f562976c0b8939e
Contents?: true
Size: 877 Bytes
Versions: 17
Compression:
Stored size: 877 Bytes
Contents
module ActiveRecord module Has #:nodoc: module MuckProfile #:nodoc: def self.included(base) base.extend(ClassMethods) end module ClassMethods 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 end # class methods module SingletonMethods end # All the methods available to a record that has had <tt>acts_as_muck_profile</tt> specified. module InstanceMethods end end end end
Version data entries
17 entries across 17 versions & 1 rubygems