Module: Intermodal::Controllers::ResourceLinking
- Extended by:
- ActiveSupport::Concern
- Included in:
- LinkingResourceController
- Defined in:
- lib/intermodal/concerns/controllers/resource_linking.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
42 43 44 45 |
# File 'lib/intermodal/concerns/controllers/resource_linking.rb', line 42 def create return head :status => 422 unless target_ids respond_with model.replace(params[:id], target_ids, :account => account), :location => nil end |
#destroy ⇒ Object
52 53 54 55 |
# File 'lib/intermodal/concerns/controllers/resource_linking.rb', line 52 def destroy return head :status => 422 unless target_ids respond_with(model.remove(params[:id], target_ids, :account => account)) end |
#index ⇒ Object
38 39 40 |
# File 'lib/intermodal/concerns/controllers/resource_linking.rb', line 38 def index respond_with presented_collection end |
#update ⇒ Object
47 48 49 50 |
# File 'lib/intermodal/concerns/controllers/resource_linking.rb', line 47 def update return head :status => 422 unless target_ids respond_with(model.append(params[:id], target_ids, :account => account)) end |