lib/has-attached.rb in has-attached-0.1.7 vs lib/has-attached.rb in has-attached-0.1.8

- old
+ new

@@ -39,10 +39,11 @@ 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") - options[:path] ||= "/attachments/:class/:id/:attachment/:style/:basename.:extension" + options[:path] = "/attachments/:class/:id/:attachment/:style/:basename.:extension" + options[:url] = :s3_domain_url else options[:storage] = 'filesystem' end has_attached_file(name, options)