%li{:id => ("selectedHeaderLink" if controller_name == "home")}= link_to
"HOME", :controller => "home", :action => "index"On Fri, Aug 14, 2009 at 9:15 AM, Alexander Wallace <[email protected]>wrote: > %li{ :id => controller_name.eql?("home") ? "selectedHeaderLink" : > "bland-identification" }= link_to "HOME", :controller => "home", :action => > "index" > > > On Fri, Aug 14, 2009 at 4:30 AM, Shuhrat Tursunov <[email protected]>wrote: > >> >> Please, help me rewrite this code in one or two lines..... >> >> - if controller_name == 'home' >> %li{:id => "selectedHeaderLink"}= link_to >> "HOME", :controller => "home", :action => "index" >> - else >> %li= link_to "HOME", :controller => "home", :action => >> "index" >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Haml" 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/haml?hl=en -~----------~----~----~----~------~----~------~--~---
