Sha256: ceaceabe1bb2f8d789484ce342e0cad4fe18e73bb3d860d503676e8847556b8a

Contents?: true

Size: 486 Bytes

Versions: 3

Compression:

Stored size: 486 Bytes

Contents

class Collection < ActiveRecord::Base
  attr_accessible :is_visible, :products_count
  attr_accessible :name, :description, :name_en, :description_en, :name_ru, :description_ru

  has_many :products

  has_one :picture, :as => :assetable, :dependent => :destroy, :conditions => {:is_main => true}

  fileuploads :picture
  translates :name, :description

  scope :visible, where(:is_visible => true)
  scope :un_visible, where(:is_visible => false)

  alias_attribute :title, :name
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ab_admin-0.1.2 spec/dummy/app/models/collection.rb
ab_admin-0.1.1 spec/dummy/app/models/collection.rb
ab_admin-0.1.0 spec/dummy/app/models/collection.rb