Class | PhotosController
In: | app/controllers/photos_controller.rb
Parent: | ApplicationController

### Methods

show

### Public Instance methods

show()

[Source]

        # File app/controllers/photos_controller.rb, line 5
     5:   def show
     6:     @photo = @album.photos.ordered_by_title.find(params[:id])
     7:     @title = "#{@album.title} :: #{@photo.title}"
     8:
     9:     all_photos = @album.photos.ordered_by_title
    10:     @next_photo = all_photos[all_photos.index(@photo) + 1]
    11:     @prev_photo = all_photos[all_photos.index(@photo) - 1] unless all_photos.index(@photo) == 0
    12:   end

[Validate]