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

Controlador para las fotos de la fototeca This controller is no longer in use. The view of a photo inside an album is handled by AlbumsController#show

Methods

show  

Public Instance methods

Vista de una foto

[Source]

    # File app/controllers/photos_controller.rb, line 9
 9:   def show
10:     # @photo = @album.photos.ordered_by_title.find(params[:id])
11:     # @title = "#{@album.title} :: #{@photo.title}"
12:     # 
13:     # all_photos = @album.photos.ordered_by_title
14:     # @next_photo = all_photos[all_photos.index(@photo) + 1] 
15:     # @prev_photo = all_photos[all_photos.index(@photo) - 1] unless all_photos.index(@photo) == 0
16:     
17:     @photo = Photo.find(params[:id])
18:     if !@album
19:       @album = @photo.albums.first
20:     end
21:     redirect_to album_photo_path(@album, @photo)
22:   end

[Validate]