Class: Kublog::Category
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Kublog::Category
- Extended by:
- FriendlyId
- Defined in:
- app/models/kublog/category.rb
Instance Method Summary collapse
-
#as_json(params = {}) ⇒ Object
Includes a path to the category by default helps reference back to edited categories in json requests.
- #to_s ⇒ Object
Instance Method Details
#as_json(params = {}) ⇒ Object
Includes a path to the category by default helps reference back to edited categories in json requests
22 23 24 25 |
# File 'app/models/kublog/category.rb', line 22 def as_json(params={}) params||={} super(params.merge!({:methods => [:path]})) end |
#to_s ⇒ Object
15 16 17 |
# File 'app/models/kublog/category.rb', line 15 def to_s self.name.titleize end |