nil.update_attributes on variable from find_by...

What is params[:job_id]. Is it what you think it is (the fact that find_by_job_id is returning nil suggests that it isn't)

Fred

Either use a ruby-debug gem and debug your code or do a puts @the_factor in your code and check the development log file.

The variable @the_factor is nil, the error message has nothing to do with update_attributes.