Commit c44048d0 by Jon Yurek

Removed the environment require at the top of paperclip_tasks.rake

parent 08aa179a
require 'environment'
def obtain_class def obtain_class
class_name = ENV['CLASS'] || ENV['class'] class_name = ENV['CLASS'] || ENV['class']
@klass = Object.const_get(class_name) @klass = Object.const_get(class_name)
...@@ -16,7 +14,7 @@ end ...@@ -16,7 +14,7 @@ end
namespace :paperclip do namespace :paperclip do
desc "Regenerates thumbnails for a given CLASS (and optional ATTACHMENT)" desc "Regenerates thumbnails for a given CLASS (and optional ATTACHMENT)"
task :refresh do task :refresh => :environment do
klass = obtain_class klass = obtain_class
instances = klass.find(:all) instances = klass.find(:all)
names = obtain_attachments 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