Class: CollectionsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- CollectionsController
- Defined in:
- app/controllers/collections_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
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 |