Class: ImagesController
- Inherits:
-
MercuryController
- Object
- ActionController::Base
- MercuryController
- ImagesController
- Defined in:
- app/controllers/images_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /images.json.
-
#destroy ⇒ Object
DELETE /images/1.json.
Methods inherited from MercuryController
#edit, #post, #resource, #snippet_options, #snippet_preview
Instance Method Details
#create ⇒ Object
POST /images.json
6 7 8 9 10 |
# File 'app/controllers/images_controller.rb', line 6 def create @image = Image.new(params[:image]) @image.save respond_with @image end |
#destroy ⇒ Object
DELETE /images/1.json
13 14 15 16 17 |
# File 'app/controllers/images_controller.rb', line 13 def destroy @image = Image.find(params[:id]) @image.destroy respond_with @image end |