Skip to content

Commit

Permalink
Removed symbol pluralization
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.thoughtbot.com/plugins/paperclip/trunk@398 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
  • Loading branch information
jyurek committed Mar 19, 2008
1 parent 17a150f commit 30c2be5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion lib/paperclip/attachment.rb
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions test/helper.rb
Expand Up @@ -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")
Expand Down

0 comments on commit 30c2be5

Please sign in to comment.