Class: CategoryDb::Model::Category
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- CategoryDb::Model::Category
- Defined in:
- lib/tagutils/categories/models/category.rb,
lib/tagutils/categories/models/category_comp.rb
Instance Method Summary collapse
- #on_before_save ⇒ Object
-
#title ⇒ Object
alias for name (depreciated api calls).
- #title=(value) ⇒ Object
Methods included from TagDb::ClassMacros
Methods included from ClassMacros
Instance Method Details
#on_before_save ⇒ Object
25 26 27 28 |
# File 'lib/tagutils/categories/models/category.rb', line 25 def on_before_save # replace space with dash e.g. north america becomes north_america and so on self.slug = key.gsub( ' ', '_' ) end |
#title ⇒ Object
alias for name (depreciated api calls)
11 |
# File 'lib/tagutils/categories/models/category_comp.rb', line 11 def title() name; end |
#title=(value) ⇒ Object
12 |
# File 'lib/tagutils/categories/models/category_comp.rb', line 12 def title=(value) self.name = value; end |