Module: Intermodal::Controllers::Resource
- Extended by:
- ActiveSupport::Concern
- Included in:
- NestedResourceController, ResourceController
- Defined in:
- lib/intermodal/concerns/controllers/resource.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
-
#show ⇒ Object
index defined in PaginatedCollection.
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
36 37 38 |
# File 'lib/intermodal/concerns/controllers/resource.rb', line 36 def create respond_with model.create(create_params) end |
#destroy ⇒ Object
45 46 47 48 |
# File 'lib/intermodal/concerns/controllers/resource.rb', line 45 def destroy resource.destroy respond_with resource end |
#show ⇒ Object
index defined in PaginatedCollection
32 33 34 |
# File 'lib/intermodal/concerns/controllers/resource.rb', line 32 def show respond_with resource end |
#update ⇒ Object
40 41 42 43 |
# File 'lib/intermodal/concerns/controllers/resource.rb', line 40 def update resource.update_attributes(update_params) respond_with resource end |