Categorized: Rails, Ruby

Title Case in ERb

Use .titleize or .titlecase. I’m using this in the <title> tag of my application.rhtml:

<%= controller.action_name.titleize %>

Source

Comments

Nothing to see here yet. Start things off, why don't you?

What do you think about that?

Elsewhere in the empire: Home, Blog, APOD