Class: SessionRecordsController

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

Instance Method Summary collapse

Methods inherited from ApplicationController

#authenticate_terminal

Instance Method Details

#createObject



4
5
6
7
8
9
# File 'app/controllers/session_records_controller.rb', line 4

def create
  session = @terminal.session_records.create! params[:session_record]
  render :text => session.id, :status => 200
rescue ActiveRecord::RecordInvalid
  render :text => nil, :status => 400
end