Forum: Ruby on Rails common header help

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.
F10f95926f620318a71c102f207649b7?d=identicon&s=25 Manish Shah (Guest)
on 2006-03-04 00:56
(Received via mailing list)
I'm trying to create a common header for my ruby on rails app.  I have
the
common layout setup in application.rhtml.  In the layout i have a div
section "header" which is where i want to add information like logo
image,
the current user logged in, navigation links, standard stuff.  However,
when
i try to add information in that "header" section, it does not display
anything that is plain text.  I added link_to's and those show up, but
if i
add the username (no link) it does not show up.  I can see that its
there
when i view source on the page, but it does not show up on the actual
page.
Why is this?

Also, the technique i am using to get the currently logged in user, is
to
render_component of a controller that looks up the current user if the
id is
in the session hash.  Is this the best way to do such a thing?

I'm new to rails, so i want to make sure i'm not violating best
practices,
and i would greatly appreciate some help.

Thanks in advance.
4005a47a8f2ceee49670b920593c1d52?d=identicon&s=25 Ben Munat (Guest)
on 2006-03-04 04:36
(Received via mailing list)
Can you post the pertinent chunk of the resulting html file (i.e. the
"header" div) and
the chunk of the application.rhtml that makes it?

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