Module: Sequel::Plugins::Taggable
- Defined in:
- lib/sequel_taggable/sequel_taggable.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary collapse
-
.apply(model, options = {}) ⇒ Object
Apply the plugin to the model.
Class Method Details
.apply(model, options = {}) ⇒ Object
Apply the plugin to the model.
5 6 7 8 9 10 11 |
# File 'lib/sequel_taggable/sequel_taggable.rb', line 5 def self.apply(model, = {}) model.class_eval %{ is :polymorphic has_many :taggings, :as => :taggable many_to_many :tags, :through => :taggings, :as => :taggable } end |