On 17 March 2010 19:12, RichardOnRails
<richarddummymailbox58...@uscomputergurus.com> wrote:
>> I don't see where you are putting this in a div with id=sidebar.
>> Should you have
>>         <% content_for :sidebar do %>
>> <div id="sidebar">
>>           This is my sidebar stuff from:<br>
>>             new.html.erb<br>
>>             RTS\app\views\expenses
>> </div>
>>         <% end %>
>> or something similar?
>
> Here's what I've got:
>
> In app\views\expenses\new.html.erb (at the bottom) I have:
>        <% content_for :sidebar do %>
>          This is my sidebar stuff from:<br>
>            new.html.erb<br>
>            RTS\app\views\expenses
>        <% end %>
>
> Both divs are defined in app\views\layouts\standard.html.erb:
>    <body id="library">
>        <div id="container">
>            <div id="header">
>                <h1>Receipts Tracking System</h1>
>                <h3>Library powered by Ruby on Rails</h3>
>            </div>
>
>            <div id="content">
>                <%= yield -%>
>            </div>
>          <div id="sidebar">
>                <%= yield -%>
>            </div>
>        </div>
>    </body>
> </html>
>
> I just added that yield to div/sidebar based on no more than hot air.
> I availed me naught.

Forget about the ruby code for the moment, just check whether the html
is correct.  If you just view the html in the browser (View, Page
Source) for the sidebar what do you see?  Is the div id='sidebar'
there?  Post that bit of html.

Colin

>
> On Mar 17, 1:18 pm, Colin Law <clan...@googlemail.com> wrote:
>> On 17 March 2010 16:52, RichardOnRails
>>
>>
>>
>> <richarddummymailbox58...@uscomputergurus.com> wrote:
>> >...
>> > app\views\layouts\expenses.html.erb:
>> > <body>
>> >    <p style="color: green"><%= flash[:notice] %></p>
>>
>> >    <table width="100%">
>> >        <tr>
>> >            <td>  <%= yield %>              </td>
>> >            <td>  <%= yield :sidebar %>  </td>
>> >        [snip]
>> > app\views\expenses\new.html.erb (at the bottom):
>> >        <% content_for :sidebar do %>
>> >          This is my sidebar stuff from:<br>
>> >            new.html.erb<br>
>> >            RTS\app\views\expenses
>> >        <% end %>
>>
>> I don't see where you are putting this in a div with id=sidebar.
>> Should you have
>>         <% content_for :sidebar do %>
>> <div id="sidebar">
>>           This is my sidebar stuff from:<br>
>>             new.html.erb<br>
>>             RTS\app\views\expenses
>> </div>
>>         <% end %>
>> or something similar?
>>
>> Colin
>
> --
> 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 rubyonrails-t...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to