Class: SimpleCataloger::Image
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- SimpleCataloger::Image
- Defined in:
- lib/dircat/cat_on_sqlite/model/image.rb
Instance Method Summary collapse
Instance Method Details
#to_json(*a) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/dircat/cat_on_sqlite/model/image.rb', line 8 def to_json(*a) { :item => if item then item.name else nil end, :tag => if tag then tag.name else nil end, :src => path_from_catalog_root }.to_json(*a) end |