Module: GovernorTags::InstanceMethods
- Defined in:
- lib/governor_tags/instance_methods.rb
Instance Method Summary collapse
Instance Method Details
#tag_list ⇒ Object
3 4 5 |
# File 'lib/governor_tags/instance_methods.rb', line 3 def tag_list self..map{|t| t.name }.join(GovernorTags.delimiter) end |
#tag_list=(tag_names) ⇒ Object
6 7 8 |
# File 'lib/governor_tags/instance_methods.rb', line 6 def tag_list=(tag_names) self. = tag_names.split(GovernorTags.delimiter).reject{|t| t.blank? }.map{|t| Tag.find_or_create_by_name(t.strip) } end |