Displaying 1 result from an estimated 1 matches for "prev_page_link".
2013 Mar 14
0
Display custom links above top level arrays using Jbuilder
...set of
next page and prev page pagination links. In my abc.json.jbuilder file
if I try doing it as per the below code, I don''t get links to the next
and prev page as part of my json response.
json.pagination_links do
json.set!(:next_page_link,"#{@next_page_link}")
json.set!(:prev_page_link,"#{@prev_page_link}")
end
json.array!(@posts) do |post|
..
..
end
The only response, that I get is the array which has a collection of
posts. Which looks like below:-
[
-{post1}
-{post2}
-..
]
I guess there is something that I might be missing. Can anybody please
suggest me any w...