Skip to content

Commit

Permalink
Change Rails.root for Rails.env. Im sleepy now
Browse files Browse the repository at this point in the history
  • Loading branch information
nhocki committed Jun 15, 2011
1 parent 8b42c94 commit 24d49c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/paperclip-s3/railtie.rb
Expand Up @@ -13,8 +13,8 @@ class Railtie < Rails::Railtie

class Railtie
def self.insert
if (defined?(Rails.root) && Rails.root && Rails.root.production?) or
(defined?(RAILS_ROOT) && RAILS_ROOT && RAILS_ROOT =~ /production/)
if (defined?(Rails.env) && Rails.env && Rails.env.production?) or
(defined?(RAILS_ENV) && RAILS_ENV && RAILS_ENV =~ /production/)

ActiveRecord::Base.send(:include, Paperclip::S3::Glue)
end
Expand Down

0 comments on commit 24d49c2

Please sign in to comment.