Sha256: 483231c5966b14fcaa46cf30609928174db6b457e2c6fccb52d5d3b8578953db

Contents?: true

Size: 444 Bytes

Versions: 12

Compression:

Stored size: 444 Bytes

Contents

module Imagine
  module Warehouses
    class Image
      def self.find(album, id)
        # returns an image from a given album
        album.images.find(id)
      end

      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

      def self.save(image)
        image.save
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
imagine-0.3.0 app/warehouses/imagine/image.rb
imagine-0.2.3 app/warehouses/imagine/image.rb
imagine-0.2.2 app/warehouses/imagine/image.rb
imagine-0.2.1 app/warehouses/imagine/image.rb
imagine-0.2.0 app/warehouses/imagine/image.rb
imagine-0.1.7 app/warehouses/imagine/image.rb
imagine-0.1.6 app/warehouses/imagine/image.rb
imagine-0.1.5 app/warehouses/imagine/image.rb
imagine-0.1.4 app/warehouses/imagine/image.rb
imagine-0.1.3 app/warehouses/imagine/image.rb
imagine-0.1.2 app/warehouses/imagine/image.rb
imagine-0.1.1 app/warehouses/imagine/image.rb