I have a pre-populated Factor row that belongs to a Job (Job has one
Factor). The upd_factor form looks fine – brings in all expected
Factor data for that Job, but when I hit submit after making changes, it
throws the error at the end of this message.
@the_factor = Factor.find_by_job_id(params[:job_id])
redirect_to :action => ‘index’, :job_id => 22
(I commented out the one line to put focus on the update_attributes
line…) seems like what i’m trying to do is simple enough – any ideas
on what i’m missing?
You have a nil object when you didn’t expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.update_attributes
Thanks in advance!