Class: DefaultTagStrategy

Inherits:
TagStrategy show all
Defined in:
lib/needle_in_a_haystack/strategies/default_tag_strategy.rb

Instance Method Summary collapse

Instance Method Details

#create_tag(name, description) ⇒ Object



2
3
4
# File 'lib/needle_in_a_haystack/strategies/default_tag_strategy.rb', line 2

def create_tag(name, description)
  HaystackTag.create(name: name, description: description)
end

#update_tag(tag, attributes) ⇒ Object



6
7
8
# File 'lib/needle_in_a_haystack/strategies/default_tag_strategy.rb', line 6

def update_tag(tag, attributes)
  tag.update(attributes)
end