Commit 77e91c07 by jyurek

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
parent b3703a19
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment