> > The Controller is > > class BookController < ApplicationController > layout 'standard' > def show_subjects > @subjects = Subject.find(params[:id]) > > end > > end > > > The show_subjects.rhtml file is : > > <h1><%= @subject.name -%></h1> > <ul> > <% @subject.books.each do |c| %> > <li><%= link_to c.title, :action => "show", :id => c.id -%></li> > <% end %> > </ul> > I don't know if this is a typo in your post or not, but your #show_subjects method sets the "@subjects" (note the plural) instance variable whereas your view references the "@subject" (note -- singular) instance variable.
--wpd --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

