Forum: Ruby on Rails Applying list-item format depending on action

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E4c4a05719644c37f02dc5181de7c8c5?d=identicon&s=25 Buntin, Seth - KATE (Guest)
on 2006-02-15 20:39
(Received via mailing list)
What would be the best way to do this?  I have a list and I want one
item to be underlined (depending on the action that I am on).  Do I?:



Have a bunch of if statements:



if :controller => 'admin', :action => 'list'

    <li id="current">Pages</li>
else
    <li>Pages</li>

end



What do you think?  Is there a better way to do this?



Seth
This topic is locked and can not be replied to.