Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
fixes issue where attachment styles are losing format options when ra…
Browse files Browse the repository at this point in the history
…ils class caching is turned on
  • Loading branch information
Fiona Foo & Nate Clark authored and Jon Yurek committed Aug 17, 2010
1 parent bb2d3b0 commit 56d6b24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/paperclip/attachment.rb
Expand Up @@ -57,7 +57,7 @@ def styles
unless @normalized_styles
@normalized_styles = {}
(@styles.respond_to?(:call) ? @styles.call(self) : @styles).each do |name, args|
@normalized_styles[name] = Paperclip::Style.new(name, args, self)
@normalized_styles[name] = Paperclip::Style.new(name, args.dup, self)
end
end
@normalized_styles
Expand Down
2 changes: 1 addition & 1 deletion test/attachment_test.rb
Expand Up @@ -340,7 +340,7 @@ class Paperclip::Test < Paperclip::Processor; end

context "An attachment with styles but no processors defined" do
setup do
rebuild_model :processors => [], :styles => {:something => 1}
rebuild_model :processors => [], :styles => {:something => '1'}
@dummy = Dummy.new
@file = StringIO.new("...")
end
Expand Down

0 comments on commit 56d6b24

Please sign in to comment.