Module: ActiveRecord::Acts::Keywordable::ClassMethods
- Defined in:
- lib/acts_as_keywordable.rb
Instance Method Summary collapse
Instance Method Details
#acts_as_keywordable(options = {}) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/acts_as_keywordable.rb', line 13 def acts_as_keywordable( = {}) class_attribute(:acts_as_keywordable_options, { :keywordable_type => self.base_class.name.to_s, :from => [:from] }) has_many :keywordings, :as => :keywordable, :dependent => :destroy has_many :keywords, :through => :keywordings include ActiveRecord::Acts::Keywordable::InstanceMethods extend ActiveRecord::Acts::Keywordable::SingletonMethods end |