Monday, December 13, 2010

Pluralization Customization in Rails 2

Got stuck with a bit of an issue:

Rails thinks that weave - weaves and that weaves - weaf
Exactly what a weaf is... well I don't know either.

Fix:

ActiveSupport::Inflector.inflections do |inflect|
inflect.irregular 'weave', 'weaves'
inflect.irregular 'weaves', 'weave'
end


in your config/initializers/inflections.rb

No comments:

Post a Comment