Commit 4340b17e by jyurek

:attachment and :class should be downcased

git-svn-id: https://svn.thoughtbot.com/plugins/paperclip/trunk@422 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
parent 01e50714
...@@ -118,7 +118,7 @@ module Paperclip ...@@ -118,7 +118,7 @@ module Paperclip
def self.interpolations def self.interpolations
@interpolations ||= { @interpolations ||= {
:rails_root => lambda{|attachment,style| RAILS_ROOT }, :rails_root => lambda{|attachment,style| RAILS_ROOT },
:class => lambda{|attachment,style| attachment.instance.class.to_s.pluralize }, :class => lambda{|attachment,style| attachment.instance.class.to_s.downcase.pluralize },
:basename => lambda do |attachment,style| :basename => lambda do |attachment,style|
attachment.original_filename.gsub(/\.(.*?)$/, "") attachment.original_filename.gsub(/\.(.*?)$/, "")
end, end,
...@@ -130,7 +130,7 @@ module Paperclip ...@@ -130,7 +130,7 @@ module Paperclip
:partition_id => lambda do |attachment, style| :partition_id => lambda do |attachment, style|
("%09d" % attachment.instance.id).scan(/\d{3}/).join("/") ("%09d" % attachment.instance.id).scan(/\d{3}/).join("/")
end, end,
:attachment => lambda{|attachment,style| attachment.name.to_s.pluralize }, :attachment => lambda{|attachment,style| attachment.name.to_s.downcase.pluralize },
:style => lambda{|attachment,style| style || attachment.default_style }, :style => lambda{|attachment,style| style || attachment.default_style },
} }
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment