I’m building a new app that consumes, simplifies, and delivers an API from a 3rd party API. My rails models are:
- Store (has many Products)
- Products (belongs to Store)
So for example, I have an store which has products. The products just consist of a Product ID. That ID is used in the 3rd party API to look up information (like a product name, image, price, etc). I can then deliver that information to with a much simpler interface to someone else and use it inside the CMS.
Currently, I have a ProductLookup controller which is handling all the API requests and returns either json or html
/product_lookups/:id(.:format) I’m struggling to figure out how to load the data I get back from the API in another view. I.E.
/product_lookups/abc is fine, but how do I get a product to show up on in
Is this even the right way to even go about this?