Forum: Ruby on Rails disable link to current page

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.
Eea3feaacbe44706164289d068d94828?d=identicon&s=25 Peter Michaux (Guest)
on 2006-03-09 02:22
(Received via mailing list)
Hi,

When writing a .rhtml file how can i detect which url is being
rendered and disable the links? Even more, I may want to change some
other css classes for other elements based on which url is the current
one.

Thanks,
Peter
4005a47a8f2ceee49670b920593c1d52?d=identicon&s=25 Ben Munat (Guest)
on 2006-03-09 07:36
(Received via mailing list)
Peter Michaux wrote:
> Hi,
>
> When writing a .rhtml file how can i detect which url is being
> rendered and disable the links? Even more, I may want to change some
> other css classes for other elements based on which url is the current
> one.

Check out link_to_unless_current and request.request_uri.

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