Class: CollectionsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/collections_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/collections_controller.rb', line 4

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