これは私がしようとしているものです:
require "active_support"
desc "test"
task :foo => [:environment] do
parse(:categories) do |hash|
# cleanup name
hash[:name] = titlecase(hash[:name])
# ...
end
end
これは私が得ているエラーです:
未定義のメソッド `titlecase' main:Object
私も試しました:
ActiveSupport::Inflector::titlecase(hash[:name])
次のエラーが発生します。
未定義のメソッド `titlecase' ActiveSupport::Inflector:Module