class TagDb::Model::Tag

Public Instance Methods

on_before_save() click to toggle source
# File lib/tagutils/tags/models/tag.rb, line 21
def on_before_save
  # replace space with dash e.g. north america becomes north_america and so on
  self.slug = key.gsub( ' ', '_' )

  ## if name is empty auto fill w/ key
  self.name = key   if name.blank?
end
title() click to toggle source

alias for name (depreciated api calls)

# File lib/tagutils/tags/models/tag_comp.rb, line 11
def title()       name;              end
title=(value) click to toggle source
# File lib/tagutils/tags/models/tag_comp.rb, line 12
def title=(value) self.name = value; end