Class: Papercat::Image

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/papercat/image.rb

Instance Method Summary collapse

Instance Method Details

#as_json(options = {}) ⇒ Object



7
8
9
# File 'app/models/papercat/image.rb', line 7

def as_json options = {}
  super(options.merge(methods: [:location]))
end

#locationObject



4
5
6
# File 'app/models/papercat/image.rb', line 4

def location
  file.url
end