link to prev/next info page in bottom

This commit is contained in:
jomo
2014-10-02 23:02:52 +02:00
parent a4338154ba
commit 8f8c1daa1e
3 changed files with 44 additions and 4 deletions
+2
View File
@@ -8,6 +8,8 @@ class InfoController < ApplicationController
end
def show
@prev = Info.where(["id < ?", @info.id]).last || Info.last
@next = Info.where(["id > ?", @info.id]).first || Info.first
end
def new