Class: Smithy::ImagesController
- Inherits:
-
BaseController
- Object
- ApplicationController
- BaseController
- Smithy::ImagesController
- Defined in:
- app/controllers/smithy/images_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
17 18 19 20 21 22 |
# File 'app/controllers/smithy/images_controller.rb', line 17 def create @image = Smithy::Image.new(filtered_params) @image.save flash.notice = "Your image was created" if @image.persisted? respond_with @image end |
#destroy ⇒ Object
35 36 37 38 39 |
# File 'app/controllers/smithy/images_controller.rb', line 35 def destroy @image = Smithy::Image.find(params[:id]) @image.destroy respond_with @image end |
#edit ⇒ Object
24 25 26 27 |
# File 'app/controllers/smithy/images_controller.rb', line 24 def edit @image = Smithy::Image.find(params[:id]) respond_with @image end |
#new ⇒ Object
12 13 14 15 |
# File 'app/controllers/smithy/images_controller.rb', line 12 def new @image = Smithy::Image.new(filtered_params) respond_with @image end |