Sharagoz -- wrote:
> Can you show the full error message?

In the code, I actually have:
book = @student.books
not
book = @student.book

This is because in Student model, I have has_many :books

And named_scope:
  named_scope :for_test,
       :include => :books, :conditions => ["books.location_id = site_id 
&& books.book_state_id = 5"]

And this is the full error:
NoMethodError in StudentsController#student_test
undefined method `id_num=' for #<Class:0x106036ea0>
-- 
Posted via http://www.ruby-forum.com/.

-- 
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