Commit ff0910dc by Jason Whittle Committed by Prem Sichanugrist

Make Storage::S3.parse_credentials use of Rails.env optional.

Closes #389, Closes #390
parent 791b70d7
...@@ -135,7 +135,8 @@ module Paperclip ...@@ -135,7 +135,8 @@ module Paperclip
def parse_credentials creds def parse_credentials creds
creds = find_credentials(creds).stringify_keys creds = find_credentials(creds).stringify_keys
(creds[Rails.env] || creds).symbolize_keys env = Object.const_defined?(:Rails) ? Rails.env : nil
(creds[env] || creds).symbolize_keys
end end
def exists?(style = default_style) def exists?(style = default_style)
......
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