Image swap and class change in layout

I’m still a newbie and can’t figure out where and also how to do this:
I just have a simple navigation bar on the right that I would like to
keep seperate from the other layouts that looks pretty much like:



My images simply add “_current” to the end of the image name to signify
that is the current page.

I’m curious how write this in Rails so I can keep it in a seperate
.rhtml file and still switch image files as each page is viewed (e.g.
about is selected and the image would change to about_current.gif and
home would revert back to home.gif, as well as changing the a href to
class=“current”), and how would I call this from the controller’s main
layout.

Thanks ahead for the help!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs