Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails problem with humanize

I am trying to humanize the symbols that are the keys for a hash

c.each_key{ |f| humanize(f.to_s)}

but for some reason, i get an error like so

ActionView::Template::Error (undefined method 'humanize' for #<#<Class:0xb5b77a4>:0xb5b6598>)

any idea what is going wrong here?

like image 691
Amit Avatar asked Jan 06 '11 20:01

Amit


1 Answers

Try this way.

c.each_key{ |f| f.to_s.humanize}
like image 58
krunal shah Avatar answered Oct 18 '22 07:10

krunal shah