Class: Account::PhoneVerificationsController

Inherits:
BaseController show all
Defined in:
app/controllers/account/phone_verifications_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

caches_page_with_cache_marker, #raise_not_found!

Instance Method Details

#createObject



8
9
10
11
12
13
# File 'app/controllers/account/phone_verifications_controller.rb', line 8

def create
  @form = Phone::VerificationForm.new(params[:phone])
  @form.submit if @form.valid?

  render_json @form, 
end

#updateObject



15
16
17
18
19
20
# File 'app/controllers/account/phone_verifications_controller.rb', line 15

def update
  @form = Phone::ConfirmationForm.new(params[:phone].reverse_merge(id: params[:id]))
  @form.submit if @form.valid?

  render_json @form, 
end