Class: Imagine::Warehouses::Image
- Inherits:
-
Object
- Object
- Imagine::Warehouses::Image
- Defined in:
- app/warehouses/imagine/image.rb
Class Method Summary collapse
Class Method Details
.find(album, id) ⇒ Object
4 5 6 7 |
# File 'app/warehouses/imagine/image.rb', line 4 def self.find(album, id) # returns an image from a given album album.images.find(id) end |
.new(album, params = nil) ⇒ Object
9 10 11 12 13 |
# File 'app/warehouses/imagine/image.rb', line 9 def self.new(album, params=nil) # returns a new image associated with the given album params ||= {} ::Imagine::Image.new(params.merge({:album_id => album.id})) end |
.save(image) ⇒ Object
15 16 17 |
# File 'app/warehouses/imagine/image.rb', line 15 def self.save(image) image.save end |