Human readable controller_name


#1

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:

The controller is: <%= controller_name %>

and i can get:

The controller is: show_names

but i would like to get:

The controller is: Show Names

thanks!


#2

“show_names”.humanize => “Show names”

close enough?

dwh


#3

Or maybe:

The controller is: <%= controller_name.humanize.titleize %>

Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/
(en)


#4

these work great…

i can’t figure out why i couldn’t find them earlier…

thanks!