You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/controllers/trial_applies_controller.rb

16 lines
346 B

6 years ago
class TrialAppliesController < ApplicationController
def create
Users::ApplyTrailService.call(current_user, create_params)
render_ok
rescue Users::ApplyTrailService::Error => ex
render_error(ex.message)
end
private
def create_params
params.permit(:phone, :code, :reason).merge(remote_ip: request.remote_ip)
end
end