Skip to content

Commit

Permalink
Remove complex logic from pictures controller
Browse files Browse the repository at this point in the history
This logic also does not work any longer since the removal
of the screen-size-based pagination.
  • Loading branch information
mamhoff committed Sep 10, 2018
1 parent f4719f7 commit e431573
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/controllers/alchemy/admin/pictures_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,15 @@ def destroy
private

def pictures_per_page_for_size(size)
return items_per_page unless in_overlay?
case size
when 'small'
per_page = in_overlay? ? 25 : (items_per_page * 2.9).floor
25
when 'large'
per_page = in_overlay? ? 4 : (items_per_page / 1.7).floor + 1
4
else
per_page = in_overlay? ? 9 : (items_per_page / 1.0).ceil + 4
9
end
per_page
end

def in_overlay?
Expand Down

0 comments on commit e431573

Please sign in to comment.