Skip to content

Commit

Permalink
Removed the environment require at the top of paperclip_tasks.rake
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Yurek committed Apr 18, 2008
1 parent 08aa179 commit c44048d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tasks/paperclip_tasks.rake
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'environment'

def obtain_class
class_name = ENV['CLASS'] || ENV['class']
@klass = Object.const_get(class_name)
Expand All @@ -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
Expand Down

0 comments on commit c44048d

Please sign in to comment.