search for: show_subject

Displaying 2 results from an estimated 2 matches for "show_subject".

Did you mean: show_subjects
2008 Dec 23
2
NoMethodError in Book#show_subjects
...abase and did the database and migration thing all over again without touching rest of the codes.Now the application runs, but when I click on the subject name, it show error, although it was working well before.Can someone help me please in this regards ???? The ERROR is : NoMethodError in Book#show_subjects Showing book/show_subjects.rhtml where line #1 raised: You have a nil object when you didn''t expect it! The error occurred while evaluating nil.name Extracted source (around line #1): 1: <h1><%= @subject.name -%></h1> 2: <ul> 3: <% @subject.books.each do |c|...
2009 Sep 14
2
Set a select box with default value selected
I am relating to the book & subject example mentioned in the tutorial mentioned here: http://www.tutorialspoint.com/ruby-on-rails-2.1/rails-examples.htm There is a file that goes like show_subjects.html.erb and it will list all the books for that particular subject we''ve selected. Suppose if there were no books to show for the subject we can ideally show a corresponding message like "there are no books for this subject yet" I''d like to rewrite that is "ther...