Displaying 1 result from an estimated 1 matches for "professor_id".
Did you mean:
processor_id
2012 May 08
1
One to many relationships
...ntroller to rate_professors controller and used scaffold. it''s
giving me this error-
NoMethodError in RateProfessorsController#index
undefined method `rate_professors'' for nil:NilClass
app/controllers/rate_professors_controller.rb:7:in `index''
Request
Parameters:
{"professor_id"=>"1"}
here are the codes for two controllers and index page--
class ProfessorsController < ApplicationController
# GET /professors
# GET /professors.json
def index
@professors = Professor.all
@rate_professors=RateProfessor.order(:lname)
respond_to do |form...