Skip to content

Commit

Permalink
Make Storage::S3.parse_credentials use of Rails.env optional.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Whittle authored and sikachu committed Jun 30, 2011
1 parent 791b70d commit ff0910d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/paperclip/storage/s3.rb
Expand Up @@ -135,7 +135,8 @@ def s3_host_alias


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)
Expand Down

0 comments on commit ff0910d

Please sign in to comment.