Class: TagBobby::Tag

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/tag_bobby/tag.rb

Instance Method Summary collapse

Instance Method Details

#tag_names=(names) ⇒ Object



7
8
9
10
11
12
13
14
# File 'app/models/tag_bobby/tag.rb', line 7

def tag_names=(names)
  if names.is_a?(TagBobby::TagNames)
    @tag_names = names
  else
    # convert the array of strings to a TagNames object
    @tag_names = TagBobby::TagNames.new_with_names self, names
  end
end