diff --git a/app/controllers/phases_controller.rb b/app/controllers/phases_controller.rb index fa8aa75..6133a45 100644 --- a/app/controllers/phases_controller.rb +++ b/app/controllers/phases_controller.rb @@ -3,23 +3,10 @@ after_action :verify_authorized - TEXTAREA = QuestionFormat.where(title: "Text area").first.id - TEXTFIELD = QuestionFormat.where(title: "Text field").first.id - RADIO = QuestionFormat.where(title: "Radio buttons").first.id - CHECKBOX = QuestionFormat.where(title: "Check box").first.id - DROPDOWN = QuestionFormat.where(title: "Dropdown").first.id - MULTI = QuestionFormat.where(title: "Multi select box").first.id # GET /plans/PLANID/phases/PHASEID/edit def edit - @textarea = TEXTAREA - @textfield = TEXTFIELD - @radio = RADIO - @checkbox = CHECKBOX - @dropdown = DROPDOWN - @multi = MULTI - @plan = Plan.find(params[:plan_id]) authorize @plan diff --git a/app/controllers/plans_controller.rb b/app/controllers/plans_controller.rb index edae8f5..43be23d 100644 --- a/app/controllers/plans_controller.rb +++ b/app/controllers/plans_controller.rb @@ -6,12 +6,6 @@ before_filter :get_plan_list_columns, only: %i( index ) after_action :verify_authorized - TEXTAREA = QuestionFormat.where(title: "Text area").first.id - TEXTFIELD = QuestionFormat.where(title: "Text field").first.id - RADIO = QuestionFormat.where(title: "Radio buttons").first.id - CHECKBOX = QuestionFormat.where(title: "Check box").first.id - DROPDOWN = QuestionFormat.where(title: "Dropdown").first.id - MULTI = QuestionFormat.where(title: "Multi select box").first.id def index authorize Plan @@ -148,12 +142,6 @@ # # GET /plans/1/edit def edit - @textarea = TEXTAREA - @textfield = TEXTFIELD - @radio = RADIO - @checkbox = CHECKBOX - @dropdown = DROPDOWN - @multi = MULTI @plan = Plan.find(params[:id])