diff --git a/lib/paperclip/attachment.rb b/lib/paperclip/attachment.rb index 80480f650..07c1a4c84 100644 --- a/lib/paperclip/attachment.rb +++ b/lib/paperclip/attachment.rb @@ -127,7 +127,7 @@ def self.interpolations File.extname(attachment.original_filename).gsub(/^\.+/, "") end, :id => lambda{|attachment,style| attachment.instance.id }, - :attachment => lambda{|attachment,style| attachment.name.pluralize }, + :attachment => lambda{|attachment,style| attachment.name.to_s.pluralize }, :style => lambda{|attachment,style| style || attachment.default_style }, } end diff --git a/test/helper.rb b/test/helper.rb index 4191afcb0..7b33d2167 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -23,14 +23,6 @@ def pluralize end end -class Symbol - unless methods.include? :pluralize - def pluralize - "#{self}s" - end - end -end - FIXTURES_DIR = File.join(File.dirname(__FILE__), "fixtures") config = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml')) ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log")