Skip to content
Browse files

fixes issue where attachment styles are losing format options when ra…

…ils class caching is turned on
  • Loading branch information...
1 parent bb2d3b0 commit 56d6b2402d553a505f29eaeb022d4a6900fda8fa Fiona Foo & Nate Clark committed with jyurek Aug 13, 2010
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/paperclip/attachment.rb
  2. +1 −1 test/attachment_test.rb
View
2 lib/paperclip/attachment.rb
@@ -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
View
2 test/attachment_test.rb
@@ -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

0 comments on commit 56d6b24

Please sign in to comment.
Something went wrong with that request. Please try again.