wip fixing last_page err

This commit is contained in:
Tangent 2019-06-13 09:14:45 -07:00
parent 717b5b7dc0
commit 2bbdc8b8e2

View File

@ -60,8 +60,8 @@ class extends lapis.Application
@page = tonumber(@params.page) or 1 @page = tonumber(@params.page) or 1
tracks = Tracks\paginated "* ORDER BY #{@order} #{@asc_desc}", per_page: 32 tracks = Tracks\paginated "* ORDER BY #{@order} #{@asc_desc}", per_page: 32
-- @last_page = tracks\num_pages! -- TODO figure out why this errors @last_page = tracks\num_pages! -- TODO figure out why this errors
@last_page = 150 -- @last_page = 150
-- validate page -- validate page
if @page < 1 if @page < 1
return redirect_to: @url_for "tracks", order: @order, asc_desc: @asc_desc, page: 1 return redirect_to: @url_for "tracks", order: @order, asc_desc: @asc_desc, page: 1