Skip to content

Commit

Permalink
Access the image name without causing performance issues. Closes refi…
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed Jan 18, 2011
1 parent 815e9b7 commit 9ceb6d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion images/lib/images.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Engine < Rails::Engine
# /system/images/BAhbB1sHOgZmIiMyMDEwLzA5LzAxL1NTQ19DbGllbnRfQ29uZi5qcGdbCDoGcDoKdGh1bWIiDjk0MngzNjAjYw/refinery_is_awesome.jpg
# Officially the way to do it, from: http://markevans.github.com/dragonfly/file.URLs.html
app_images.url_suffix = proc{|job|
"/#{job.uid_basename}#{job.encoded_extname || job.uid_extname}"
"/#{job.app.datastore.retrieve(job.uid).last[:name]}"
}

### Extend active record ###
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/resources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Engine < Rails::Engine
# /system/images/BAhbB1sHOgZmIiMyMDEwLzA5LzAxL1NTQ19DbGllbnRfQ29uZi5qcGdbCDoGcDoKdGh1bWIiDjk0MngzNjAjYw/refinery_is_awesome.pdf
# Officially the way to do it, from: http://markevans.github.com/dragonfly/file.URLs.html
app_resources.url_suffix = proc{|job|
"/#{job.uid_basename}#{job.encoded_extname || job.uid_extname}"
"/#{job.app.datastore.retrieve(job.uid).last[:name]}"
}

### Extend active record ###
Expand Down

0 comments on commit 9ceb6d1

Please sign in to comment.