module Spree
  class Gallery < ActiveRecord::Base
    validates :gallery_name, :presence => true
    has_many :gallery_items

    def all_items
      gallery_items.all
    end

    def self.by_name(name)
      Gallery.find_by_gallery_name(name)
    end

  end
end
