views:

41

answers:

1

I have a setting in environment/production.rb of HEROKU = true

This should change my has_attachment has to use s3 instead of the file system, but it doesn't. What's wrong with my logic?

has_attachment :content_type => :image,
               :storage => ($HEROKU ? :s3 : :file_system),
               ...

Thanks!

+1  A: 

Why the $ in front of HEROKU in your code? Have you tried without it?

You may also want to take a look at this config vars example from Heroku's documentation for the way they suggest doing things like this.

Topher Fangio