Class: FamilyGallery::PicturesController

Inherits:
ResourcesController show all
Defined in:
app/controllers/family_gallery/pictures_controller.rb

Instance Method Summary collapse

Methods inherited from ResourcesController

#create, #destroy, #edit, #index, inherited, #new, #update

Methods included from BaseFamilyGalleryController

#current_ability, #current_user

Instance Method Details

#showObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/controllers/family_gallery/pictures_controller.rb', line 4

def show
  if view_context.agent_mobile?
    @width = 400
  else
    @width = 800
  end

  @height = @picture.height_for_width(@width)

  if @group
    @previous_picture = @picture.previous_picture_in_group(@group)
    @next_picture = @picture.next_picture_in_group(@group)
  end
end