Many Changes: Rename privacy_policy, fixed seed.rb, fixed status in migration file, created new job for operator
This commit is contained in:
@@ -83,6 +83,6 @@ class JobsController < ApplicationController
|
||||
|
||||
# Only allow a list of trusted parameters through.
|
||||
def job_params
|
||||
params.require(:job).permit(:costumer_id, :costumer_firstname, :costumer_lastname, :privacy_policy_accepted, :pdf)
|
||||
params.require(:job).permit(:costumer_id, :costumer_firstname, :costumer_lastname, :privacy_policy, :pdf)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -20,6 +20,7 @@ class Operator::JobsController < ApplicationController
|
||||
# POST /jobs or /jobs.json
|
||||
def create
|
||||
@job = Job.new(job_params)
|
||||
@job.created_by_operator = true
|
||||
|
||||
respond_to do |format|
|
||||
if @job.save
|
||||
@@ -43,7 +44,6 @@ class Operator::JobsController < ApplicationController
|
||||
format.html { redirect_to operator_jobs_url, notice: "Job was successfully updated." }
|
||||
else
|
||||
flash[:alert] = "Job was not updated."
|
||||
format.turbo_stream
|
||||
format.html { render :edit, status: :unprocessable_entity }
|
||||
end
|
||||
end
|
||||
@@ -110,7 +110,7 @@ class Operator::JobsController < ApplicationController
|
||||
|
||||
# Only allow a list of trusted parameters through.
|
||||
def job_params
|
||||
params.require(:job).permit(:operator_id, :costumer_id, :operator_firstname, :operator_lastname, :costumer_firstname, :costumer_lastname, :status, :privacy_policy_accepted, :intern, :cost_center, :number_of_plans_a0, :number_of_plans_a1, :number_of_plans_a2, :number_of_plans_a3, :costum_qm_plan)
|
||||
params.require(:job).permit(:pdf, :operator_id, :costumer_id, :operator_firstname, :operator_lastname, :costumer_firstname, :costumer_lastname, :status, :privacy_policy, :intern, :cost_center, :number_of_plans_a0, :number_of_plans_a1, :number_of_plans_a2, :number_of_plans_a3, :costum_qm_plan)
|
||||
end
|
||||
|
||||
# FIXME: Move broadcast to model though i don't think view logic belongs in the model
|
||||
|
||||
Reference in New Issue
Block a user