root/app/models/artwork_step_image.rb @ a579432b
b689e231 | Marc Dequènes (Duck) | class ArtworkStepImage < ArtworkStep
|
|
has_many :artwork_step_thumbnails, :foreign_key => 'parent_id'
|
|||
has_attachment :content_type => :image,
|
|||
:max_size => MyCyma::Config.instance.max_uploaded_image_size_mb.megabyte,
|
|||
:storage => :file_system,
|
|||
:path_prefix => base_upload_path(),
|
|||
:thumbnails => MyCyma::Config.instance.thumbnail_param_list,
|
|||
:thumbnail_class => ArtworkStepThumbnail
|
|||
validates_presence_of :filename, :date, :artwork_id #, :void
|
|||
validates_uniqueness_of :filename, :scope => :artwork_id
|
|||
validates_as_attachment
|
|||
public :after_process_attachment
|
|||
attr_accessor :saved_attachment
|
|||
end
|