Class: Plotline::ImagesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/plotline/images_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



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

#indexObject



5
6
7
# File 'app/controllers/plotline/images_controller.rb', line 5

def index
  @images = Image.order('id desc')
end

#showObject



9
10
11
# File 'app/controllers/plotline/images_controller.rb', line 9

def show
  @image = Image.find(params[:id])
end