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.
on 2006-03-04 00:56
on 2006-03-04 04:36
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