Permalink
Browse files

Rails 3: use Rails.env instead of RAILS_ENV

closes #1
  • Loading branch information...
1 parent 675faa5 commit 566a8cad6ddee26ed1529ad5bafc40aa8253add2 Marcin Bunsch committed with jrom Jan 12, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/choices/rails.rb
@@ -17,7 +17,7 @@ def from_file(name)
root = self.respond_to?(:root) ? self.root : Rails.root
file = root + 'config' + name
- settings = Choices.load_settings(file, RAILS_ENV)
+ settings = Choices.load_settings(file, Rails.respond_to?(:env) ? Rails.env : RAILS_ENV)
@choices.update settings
settings.each do |key, value|

0 comments on commit 566a8ca

Please sign in to comment.