> <li <%= ('class="current"') if controller.controller_name == 'users' &&
> controller.action_name == 'login' %>>First, move "if controller.controller_name == 'users' && controller.action_name == 'login'" into a helper and give it a name, such as login_page_class. It should return nil on the wrong page and 'current' on the right page. Next, use content_tag to build the entire li. Then if :class => login_page_class contains the nil, the class="" itself will go away in the rendered HTML. (And put all this under test, because it's logic that you want to keep alive as you upgrade this site!) -- Phlip --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

