Ask A Question


You’re not receiving notifications from this thread.

How do I embed an internal routes/show page on to an external website?

Arjun Rajkumar asked in Javascript
Hey all, 

I've seen websites where you place some Javascript code - and they are able to display information from another website on their website. Wondering how I can do the same? I have a page which displays a map of a user with some other details. Any idea how I can embed this same page on an external website which shows the same map?



Since most of it is done using Javascript, you could technically copy the code from any example you have. 
As for the Rails part, you likely need to get `get` the Json for the user. Also CORS is something to keep in mind. 
I've build a couple of JS snippets/embeds. Happy to help with any specific issues.
Thanks will try over the weekend and get back if any doubts. 
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 83,453+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.