Class: Mercury::Image

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#sizeObject

Returns the value of attribute size.



8
9
10
# File 'app/models/mercury/image.rb', line 8

def size
  @size
end

Instance Method Details

#serializable_hash(options = nil) ⇒ Object



10
11
12
13
14
15
# File 'app/models/mercury/image.rb', line 10

def serializable_hash(options = nil)
  options ||= {}
  options[:methods] ||= []
  options[:methods] << :url
  super(options)
end

#urlObject



17
18
19
# File 'app/models/mercury/image.rb', line 17

def url
  self.image(:resized)
end