Buntin, Seth - KATE
2006-Feb-15 19:38 UTC
[Rails] Applying list-item format depending on action
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060215/dc0688d5/attachment.html
Hogan, Brian P.
2006-Feb-15 19:47 UTC
[Rails] Applying list-item format depending on action
link_to_unless_current for all of them
:)
-----Original Message-----
From: rails-bounces@lists.rubyonrails.org
[mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Buntin, Seth -
KATE
Sent: Wednesday, February 15, 2006 1:38 PM
To: rails@lists.rubyonrails.org
Subject: [Rails] Applying list-item format depending on action
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060215/68e4e659/attachment.html
Hogan, Brian P.
2006-Feb-15 19:58 UTC
[Rails] Applying list-item format depending on action
Wait, that''s not quite what you wanted. They''re not links :)
oh well, I tried. The if block you''re doing would be exactly what I
would do.
-----Original Message-----
From: rails-bounces@lists.rubyonrails.org
[mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Hogan, Brian
P.
Sent: Wednesday, February 15, 2006 1:47 PM
To: rails@lists.rubyonrails.org
Subject: RE: [Rails] Applying list-item format depending on action
link_to_unless_current for all of them
:)
-----Original Message-----
From: rails-bounces@lists.rubyonrails.org
[mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Buntin, Seth -
KATE
Sent: Wednesday, February 15, 2006 1:38 PM
To: rails@lists.rubyonrails.org
Subject: [Rails] Applying list-item format depending on action
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060215/b01010c1/attachment-0001.html
Buntin, Seth - KATE
2006-Feb-15 20:08 UTC
[Rails] RE: Applying list-item format depending on action
How do I get what controller and action I am currently viewing? I tried if :controller => ''admin'' && :action => ''list'' but I am a newb so I really don''t know. Seth Buntin Web Resources Coordinator Kentucky Academy of Technology Education Murray State University -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060215/c6751c5f/attachment.html