OK Craig, I got it: I missed the _ in the name. Problem solved. Thank you very much for your help.
Best wishes, Richard On Mar 8, 10:06 pm, Craig White <craigwh...@azapple.com> wrote: > On Mon, 2010-03-08 at 18:52 -0800, RichardOnRails wrote: > > Hi Craig, > > > Thanks for your response. > > > > 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 > > > h1>Listing vendors</h1> > > > <div id="menu"> > > <%= link_to 'Vendor', :controller=>'vendors', > > :action=>'index' %> > > <%= link_to 'User', :controller=>'users', > > :action=>'index' %> > > </div > > <br/> > > > <%= render "shared/menu" %> > > <br/> > > [snip] > > > I left in my working menu div and hoping my menu.html.erb or menu.erb > > files in app\views\shared will be invoked. > > > Sadly, I got: > > ActionView::MissingTemplate in Vendors#index > > > Showing app/views/vendors/index.html.erb where line #11 raised: > > > Missing template shared/_menu.erb in view path app/views > > > Extracted source (around line #11): > > > 8: </div > > 9: <br/> > > 10: > > 11: <%= render "shared/menu" %> > > 12: > > 13: <table> > > 14: <tr> > > > Can you spot where I erred? > > > Again, thanks in advance for any guidance you may offer. > > > Best wishes, > > Richard > > > On Mar 8, 7:56 pm, Craig White <craigwh...@azapple.com> wrote: > > > On Mon, 2010-03-08 at 16:20 -0800, RichardOnRails wrote: > > > > 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) > > ---- > it's telling you exactly what the problem is... > > Missing template shared/_menu.erb in view path app/views > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > Craig > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. -- 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.