I am facing some difficulty finding the previous and next product id of a product in my rails app.
Let me explain it in detail.
What i am trying to do?
I am trying to create a admin product detail page similar to the shopify. i have a product id and I get the product information from product API. Now i would like to add the feature to navigate to previous product or next product from that detail page, so that customer don't need to go to product list and then again navigate to detail page.
Check the screenshot to see what I mean https://goo.gl/wE2L6W .
Can someone suggest me the approach of doing it?
|3 hours ago|
|5 hours ago|
|7 hours ago|