Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed the environment require at the top of paperclip_tasks.rake

git-svn-id: https://svn.thoughtbot.com/plugins/paperclip/trunk@463 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
  • Loading branch information...
commit 77e91c07d9eed421ae62d17b4e939614a477ee55 1 parent b3703a1
jyurek authored
Showing with 1 addition and 3 deletions.
  1. +1 −3 tasks/paperclip_tasks.rake
View
4 tasks/paperclip_tasks.rake
@@ -1,5 +1,3 @@
-require 'environment'
-
def obtain_class
class_name = ENV['CLASS'] || ENV['class']
@klass = Object.const_get(class_name)
@@ -16,7 +14,7 @@ end
namespace :paperclip do
desc "Regenerates thumbnails for a given CLASS (and optional ATTACHMENT)"
- task :refresh do
+ task :refresh => :environment do
klass = obtain_class
instances = klass.find(:all)
names = obtain_attachments
Please sign in to comment.
Something went wrong with that request. Please try again.