lib/has-attached.rb in has-attached-0.1.4 vs lib/has-attached.rb in has-attached-0.1.5
- old
+ new
@@ -34,10 +34,10 @@
options[:url] ||= "/attachments/:class/:id/:attachment/:style/:basename.:extension"
options[:path] ||= ":rails_root/public/attachments/:class/:id/:attachment/:style/:basename.:extension"
@all_styles ||= (YAML.load_file(Rails.root.join("config", "styles.yml")) rescue {"styles" => {}})["styles"]
- options[:styles] = @all_styles.fetch(self.name.underscore, {}).fetch(name.to_s, {})
+ options[:styles] = @all_styles.fetch(self.name.underscore, {}).fetch(name.to_s, {}).symbolize_keys
if Rails.env.production? && Rails.application.config.respond_to?(:upload_attachments_to_s3) && Rails.application.config.upload_attachments_to_s3
options[:storage] = 's3'
options[:s3_credentials] = Rails.root.join("config", "s3.yml")
else