Module: ActsAsTaggableOn::Taggable
- Defined in:
- lib/acts_as_taggable_on/taggable.rb,
lib/acts_as_taggable_on/acts_as_taggable_on/core.rb,
lib/acts_as_taggable_on/acts_as_taggable_on/cache.rb,
lib/acts_as_taggable_on/acts_as_taggable_on/dirty.rb,
lib/acts_as_taggable_on/acts_as_taggable_on/related.rb,
lib/acts_as_taggable_on/acts_as_taggable_on/ownership.rb,
lib/acts_as_taggable_on/acts_as_taggable_on/collection.rb
Defined Under Namespace
Modules: Cache, Collection, Core, Dirty, Ownership, Related
Instance Method Summary collapse
-
#acts_as_ordered_taggable ⇒ Object
This is an alias for calling
acts_as_ordered_taggable_on :tags
. -
#acts_as_ordered_taggable_on(*tag_types) ⇒ Object
Make a model taggable on specified contexts and preserves the order in which tags are created.
-
#acts_as_taggable ⇒ Object
This is an alias for calling
acts_as_taggable_on :tags
. -
#acts_as_taggable_on(*tag_types) ⇒ Object
Make a model taggable on specified contexts.
- #taggable? ⇒ Boolean
Instance Method Details
#acts_as_ordered_taggable ⇒ Object
This is an alias for calling acts_as_ordered_taggable_on :tags
.
Example:
class Book < ActiveRecord::Base
acts_as_ordered_taggable
end
25 26 27 |
# File 'lib/acts_as_taggable_on/taggable.rb', line 25 def acts_as_ordered_taggable acts_as_ordered_taggable_on :tags end |
#acts_as_ordered_taggable_on(*tag_types) ⇒ Object
Make a model taggable on specified contexts and preserves the order in which tags are created
Example:
class User < ActiveRecord::Base
acts_as_ordered_taggable_on :languages, :skills
end
53 54 55 |
# File 'lib/acts_as_taggable_on/taggable.rb', line 53 def acts_as_ordered_taggable_on(*tag_types) taggable_on(true, tag_types) end |
#acts_as_taggable ⇒ Object
This is an alias for calling acts_as_taggable_on :tags
.
Example:
class Book < ActiveRecord::Base
acts_as_taggable
end
14 15 16 |
# File 'lib/acts_as_taggable_on/taggable.rb', line 14 def acts_as_taggable acts_as_taggable_on :tags end |
#acts_as_taggable_on(*tag_types) ⇒ Object
Make a model taggable on specified contexts.
Example:
class User < ActiveRecord::Base
acts_as_taggable_on :languages, :skills
end
38 39 40 |
# File 'lib/acts_as_taggable_on/taggable.rb', line 38 def acts_as_taggable_on(*tag_types) taggable_on(false, tag_types) end |
#taggable? ⇒ Boolean
3 4 5 |
# File 'lib/acts_as_taggable_on/taggable.rb', line 3 def taggable? false end |