我正在尝试在我的控制台中测试一种方法,但即使是基本的复数形式 -
pluralize(1, 'person')
不会工作..
输出:
NoMethodError: undefined method 'pluralize' for main:Object
from (pry):42:in '<main>'
但helper.method(:pluralize)
告诉我:Method: ActionView::Base(ActionView::Helpers::TextHelper)#pluralize
我错过了什么?