Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @job = Job.get(params[:id])
- redirect_if_not_found @job
- @application = @job.applications.new(params[:application])
- #If there's an error, render the form again
- haml(:'jobs/apply', :layout => false) unless @application.save
- params[:answers].each do |id, answer|
- next unless question = Question.get(id)
- @application.answers.create(answer.merge(:question => question))
- end
Add Comment
Please, Sign In to add comment