我正在使用 Rails (3.0.1) 并在 initializers/inflections.rb 中有以下代码
ActiveSupport::Inflector.inflections do |inflect|
inflect.irregular('nursery', 'nurseries')
end
从控制台我得到:
"nursery".pluralize => "nurseries"
"nurseries".singularize => "nurseries"
我应该得到:
"nurseries".singularize => "nursery"
有任何想法吗?