Class: TestRunsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/test_runs_controller.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) create



7
8
9
10
11
# File 'app/controllers/test_runs_controller.rb', line 7

def create
  @test_run.user_id = current_user.id
  @test_run.save
  render json: @test_run, status: :created
end

- (Object) create_params



18
19
20
# File 'app/controllers/test_runs_controller.rb', line 18

def create_params
  params.permit(:test_id, :os, :os_version, :browser, :mobile, :screen_width, :screen_height)
end

- (Object) update



13
14
15
16
# File 'app/controllers/test_runs_controller.rb', line 13

def update
  @test_run.touch
  render json: @test_run, status: :ok
end