Class: Touchpass::VerificationsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/touchpass/verifications_controller.rb

Instance Method Summary collapse

Instance Method Details

#cancelObject



25
26
27
28
29
30
31
32
# File 'app/controllers/touchpass/verifications_controller.rb', line 25

def cancel
  verification = Touchpass::Rp::Verification.new
  response = verification.cancel(params[:id])

  respond_to do |format|
    format.json { render :json => response.to_json, :status => response.http_status_code }
  end
end

#createObject



7
8
9
10
11
12
13
14
# File 'app/controllers/touchpass/verifications_controller.rb', line 7

def create
  verification = Touchpass::Rp::Verification.new
  response = verification.create(params[:to_user], params)

  respond_to do |format|
    format.json { render :json => response.to_json, :status => response.http_status_code }
  end
end

#showObject



16
17
18
19
20
21
22
23
# File 'app/controllers/touchpass/verifications_controller.rb', line 16

def show
  verification = Touchpass::Rp::Verification.new
  response = verification.show(params[:id])

  respond_to do |format|
    format.json { render :json => response.to_json, :status => response.http_status_code }
  end
end