开发者

Custom Inflections not working on rails3?

I'm using Rails (3.0.1) and have the following code in initializers/inflections.rb

ActiveSupport::Inflector.inflections do |inflect|
inflect.irregular开发者_如何学编程('nursery', 'nurseries')
end

From the console I'm getting:

"nursery".pluralize => "nurseries"
"nurseries".singularize => "nurseries"

I should be getting:

"nurseries".singularize => "nursery"

Any ideas?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜