you need to use 'templates' but this is rather elemental
You're spot on. This is my first "real" Rails app (for my son who
runs a couple of private schools). So I'd like to get this working in
a timely but correctly implement fashion.
Following your link, I modified my working module app\views\vendors
\index.html.erb as follows
> you need to use 'templates' but this is rather elemental
You're spot on. This is my first "real" Rails app (for my son who
runs a couple of private schools). So I'd like to get this working in
a timely but correctly implement fashion.
Following your link, I modified my working module app\views\vendors
\index.html.erb as follows
Again, thanks in advance for any guidance you may offer.
Best wishes,
Richard
> > Hi All,
>
> > I've got a bunch of views for Vendors and Users, e.g. app\views\vendors
> > \index.html.erb:
>
> > <h1>Listing vendors</h1>
>
> > <div id="menu">
> > <%= link_to 'Vendor', :controller=>'vendors',
> > :action=>'index' %>
> > <%= link_to 'User', :controller=>'users',
> > :action=>'index' %>
> > </div
> > <br/>
>
> > <table>
> > <tr>
> > <th>Nickname</th>
> > <th>Qbname</th>
> > </tr>
>
> > <% @vendors.each do |vendor| %>
> > <tr>
> > <td><%=h vendor.nickname %></td>
>
> > [snip]
>
> > I pasted the div "menu" into all the views. When I change that menu,
> > I've got to change all of them. Pretty bad, eh?
>
> > I've also got that menu in app\views\layouts\menu.html.erb.
>
> > Can I replace the div I pasted in manually with some kind of "include"
> > referencing that .erb? I tried a bunch of ways to no avail.
>
> ----http://api.rubyonrails.org/classes/ActionView/Base.html
>
> you need to use 'templates' but this is rather elemental and suggests
> that you need to check out more basic tutorials or possibly AWDWROR
> (Agile Web Development With Ruby on Rails)
>
I saw and understood and tried to respond to that message. Following
is the a session in a Command Window on my Win-XP/SP3 system that seem
to provide the alleged missing code: