[Rails] Re: NoMethodError in Book#show_subjects

2008-12-23 Thread Manisha Tripathy
Thanks a lot Patrick, it works now!!! thanks a lot. Patrick Doyle wrote: >> end >> > 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 -- singul

[Rails] Re: NoMethodError in Book#show_subjects

2008-12-23 Thread Patrick Doyle
> > The Controller is > > class BookController < ApplicationController > layout 'standard' > def show_subjects >@subjects = Subject.find(params[:id]) > > end > > end > > > The show_subjects.rhtml file is : > > <%= @subject.name -%> > > <% @subject.books.each do |c| %> > <%= link_to c.title