Create a method in application_helper.rb to compare the root path with
request.env['PATH_INFO'], returning the url of the appropriate logo
(pass the root path and both logos in with the method call in your
layout).
logo_helper("/your root path/", "/images/big_logo.png", "/
images/small_logo.png")
On Dec 18, 4:54 pm, Walter Lee Davis <[email protected]> wrote:
> I have a very simple request from my client that there be a larger
> logo on the home page than every other page in the site. I did
> something fairly kludgy to make it work quickly -- put a bare variable
> in the application controller:
>
> at_root = false
>
> and then in my home method put
>
> at_root = true
>
> and test for that in the view. But this seems like three times too
> much work to me, plus it puts view-related stuff in the controller. Is
> there a simple test I can perform in the view, so I can know if the
> current request == :root or not?
>
> Google has been unhelpful, probably because the words in my question
> are too general.
>
> Walter
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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/rubyonrails-talk?hl=en.