Class: SystemTester::ScenarioStepsController
- Inherits:
-
ApplicationController
- Object
- ActionController::API
- ApplicationController
- SystemTester::ScenarioStepsController
- Defined in:
- app/controllers/system_tester/scenario_steps_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'app/controllers/system_tester/scenario_steps_controller.rb', line 6 def create scenario_step = ScenarioStep.new(scenario_step_params) if scenario_step.save render json: scenario_step.to_json() else render json: { errors: scenario_step.errors }, status: :unprocessable_entity end end |
#destroy ⇒ Object
24 25 26 27 |
# File 'app/controllers/system_tester/scenario_steps_controller.rb', line 24 def destroy ScenarioStep.find(params[:id]).destroy! render json: {} end |
#update ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'app/controllers/system_tester/scenario_steps_controller.rb', line 15 def update scenario_step = ScenarioStep.find(params[:id]) if scenario_step.update(scenario_step_params) render json: scenario_step.to_json() else render json: { errors: scenario_step.errors }, status: :unprocessable_entity end end |