Revision 6fed455d
Added by Marc Dequènes over 14 years ago
- ID 6fed455da6e27ceb391965edf53eb8c5a0d21fc0
app/models/artwork_step_image.rb | ||
---|---|---|
temp_file = create_temp_file
|
||
create_or_update_thumbnail(temp_file, size_name, size)
|
||
end
|
||
|
||
def exists?
|
||
File.exists?(self.full_filename)
|
||
end
|
||
end
|
app/models/artwork_step_thumbnail.rb | ||
---|---|---|
has_attachment :content_type => :image,
|
||
:storage => :file_system,
|
||
:path_prefix => base_upload_path()
|
||
|
||
def exists?
|
||
File.exists?(self.thumbnail)
|
||
end
|
||
|
||
def public_filename
|
||
super(self.thumbnail)
|
||
end
|
||
end
|
Also available in: Unified diff
[evol] added helper methods for ArtworkStep<Image|Thumbnail>