was wondering if it's possible to have a human readable controller name in my page title.. ie: if my controller name is: show_names i can have my view do: <title> The controller is: <%= controller_name %></title> and i can get: <title>The controller is: show_names</title> but i would like to get: <title> The controller is: Show Names </title> thanks!
on 2009-02-20 21:41
on 2009-02-20 21:55
"show_names".humanize => "Show names" close enough? dwh
on 2009-02-20 21:58
Or maybe: <title> The controller is: <%= controller_name.humanize.titleize %></title> - Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)
on 2009-02-20 22:07
these work great.. i can't figure out why i couldn't find them earlier... thanks!