Added Screenshot.image_url for Rake migration task to paperclip
This commit is contained in:
parent
ada5832dae
commit
825d1fcff3
1 changed files with 6 additions and 0 deletions
|
|
@ -30,6 +30,12 @@ class Screenshot < ActiveRecord::Base
|
|||
"Anonymous"
|
||||
end
|
||||
|
||||
# Return Debshots 1.x path to allow migration of images into Paperclip filesystem schema
|
||||
def image_url(size)
|
||||
"#{Rails.configuration.images_path_prefix}/#{self.package.name[0]}/#{self.package.name}/#{self.id}_#{size}.png"
|
||||
end
|
||||
|
||||
|
||||
def status
|
||||
text = ''
|
||||
# Completes the sentence: "This image…"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue