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! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
"show_names".humanize => "Show names" close enough? dwh Sergio Ruiz wrote:> 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! >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 Fri, Feb 20, 2009 at 4:54 PM, Denis Haskin <denis-QjqrIaraUJHsRQ7aLHQQZ6xOck334EZe@public.gmane.org> wrote:> "show_names".humanize => "Show names" > > close enough? > > dwh > > > Sergio Ruiz wrote: > > 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! > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
these work great.. i can''t figure out why i couldn''t find them earlier... thanks! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---