Module: MakeTaggable::Taggable
- Defined in:
- lib/make_taggable/taggable.rb,
lib/make_taggable/taggable/core.rb,
lib/make_taggable/taggable/cache.rb,
lib/make_taggable/taggable/related.rb,
lib/make_taggable/taggable/ownership.rb,
lib/make_taggable/taggable/collection.rb,
lib/make_taggable/taggable/tag_list_type.rb
Defined Under Namespace
Modules: Cache, Collection, Core, Ownership, Related, TaggedWithQuery Classes: TagListType
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
make_taggable :tags. -
#make_taggable(*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/make_taggable/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
52 53 54 |
# File 'lib/make_taggable/taggable.rb', line 52 def acts_as_ordered_taggable_on(*tag_types) taggable_on(true, tag_types) end |
#acts_as_taggable ⇒ Object
This is an alias for calling make_taggable :tags.
Example:
class Book < ActiveRecord::Base
acts_as_taggable
end
14 15 16 |
# File 'lib/make_taggable/taggable.rb', line 14 def acts_as_taggable make_taggable :tags end |
#make_taggable(*tag_types) ⇒ Object
Make a model taggable on specified contexts.
Example:
class User < ActiveRecord::Base
make_taggable :languages, :skills
end
38 39 40 |
# File 'lib/make_taggable/taggable.rb', line 38 def make_taggable(*tag_types) taggable_on(false, tag_types) end |
#taggable? ⇒ Boolean
3 4 5 |
# File 'lib/make_taggable/taggable.rb', line 3 def taggable? false end |