Class: Plotline::ImagesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Plotline::ImagesController
- Defined in:
- app/controllers/plotline/images_controller.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
13 14 15 16 17 |
# File 'app/controllers/plotline/images_controller.rb', line 13 def destroy @image = Image.find(params[:id]) @image.destroy redirect_to :back, notice: 'Image was successfully destroyed.' end |
#index ⇒ Object
5 6 7 |
# File 'app/controllers/plotline/images_controller.rb', line 5 def index @images = Image.order('id desc') end |
#show ⇒ Object
9 10 11 |
# File 'app/controllers/plotline/images_controller.rb', line 9 def show @image = Image.find(params[:id]) end |