Skip to content

Commit

Permalink
Possibly fix issues with all mappings being called
Browse files Browse the repository at this point in the history
This fixes a problem in the interaction between
the Paperclip compat module and mongoid.

See: http://groups.google.com/group/carrierwave/browse_thread/thread/a061ba8aa16688b6
  • Loading branch information
jnicklas committed Feb 25, 2010
1 parent 8760af9 commit fc3f1d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/carrierwave/compatibility/paperclip.rb
Expand Up @@ -72,7 +72,7 @@ def paperclip_style

def interpolate_paperclip_path(path, filename)
mappings.inject(path) do |agg, pair|
agg.gsub(":#{pair[0]}", pair[1].call(self, filename).to_s)
agg.gsub(":#{pair[0]}") { pair[1].call(self, filename).to_s }
end
end

Expand All @@ -92,4 +92,4 @@ def mappings

end # Paperclip
end # Compatibility
end # CarrierWave
end # CarrierWave

0 comments on commit fc3f1d7

Please sign in to comment.