Class: Shoppy::Brand

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/shoppy/brand.rb

Direct Known Subclasses

Brand

Instance Method Summary collapse

Instance Method Details

#brand_imageObject

Validators



12
13
14
15
# File 'app/models/shoppy/brand.rb', line 12

validates_attachment	:brand_image,
presence: true,
content_type: { content_type: /\Aimage\/.*\Z/ },
size: { less_than: 1.megabyte }

#productsObject

Relationships



4
# File 'app/models/shoppy/brand.rb', line 4

has_many :products, dependent: :nullify