Class: CategoryDb::Model::Category
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- CategoryDb::Model::Category
- Defined in:
- lib/tagutils/models/category.rb
Instance Method Summary collapse
- #on_before_save ⇒ Object
-
#title ⇒ Object
alias for name (remove! add depreciated api call) ?? why? why not??.
- #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/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 (remove! add depreciated api call) ?? why? why not??
34 |
# File 'lib/tagutils/models/category.rb', line 34 def title() name; end |
#title=(value) ⇒ Object
35 |
# File 'lib/tagutils/models/category.rb', line 35 def title=(value) self.name = value; end |