Module: Mongoid::Document::Taggable::InstanceMethods
- Defined in:
- lib/workarea/ext/freedom_patches/mongoid_simple_tags.rb
Instance Method Summary collapse
Instance Method Details
#tag_list ⇒ Object
22 23 24 |
# File 'lib/workarea/ext/freedom_patches/mongoid_simple_tags.rb', line 22 def tag_list self..join(", ") if end |
#tag_list=(tags) ⇒ Object
18 19 20 |
# File 'lib/workarea/ext/freedom_patches/mongoid_simple_tags.rb', line 18 def tag_list=() self. = .to_s.split(",").collect { |t| t.strip }.delete_if { |t| t.blank? } end |
#tags ⇒ Object
26 27 28 |
# File 'lib/workarea/ext/freedom_patches/mongoid_simple_tags.rb', line 26 def super || [] end |
#tags=(tags) ⇒ Object
30 31 32 |
# File 'lib/workarea/ext/freedom_patches/mongoid_simple_tags.rb', line 30 def () super(&.uniq) end |