Module: ActsAsOrganizable::TaggableMethods::InstanceMethods
- Defined in:
- lib/acts_as_organizable.rb
Instance Method Summary collapse
- #get_tag_list(kind) ⇒ Object
- #save_with_tags(tag_owner = nil) ⇒ Object
- #set_tag_list(kind, list) ⇒ Object
Instance Method Details
#get_tag_list(kind) ⇒ Object
68 69 70 71 72 |
# File 'lib/acts_as_organizable.rb', line 68 def get_tag_list(kind) # set instance variable unless it exists set_tag_list(kind, .of_kind(kind).map(&:name)) if tag_list_instance_variable(kind).nil? tag_list_instance_variable(kind) end |
#save_with_tags(tag_owner = nil) ⇒ Object
74 75 76 77 78 79 80 81 82 83 |
# File 'lib/acts_as_organizable.rb', line 74 def (tag_owner = nil) if self.save # save the parent object first tag_kinds.each do |tag_kind| (tag_kind) create_taggings(tag_kind, tag_owner) end else return false end end |