I have a rails site where users make a custom profile. It’s a picture of themselves with a link and a title sentence, sorta of like a billboard with words.
I want to take this show view from rails and create custom javascript snippet of code for each user so they could copy and paste it into their own websites and blogs and have it show up according to my rails site.
How is this done? Is there a gem?
Thanks
One option is to use fixe sized iFrame, which acts as a sort of window into another site, instead of javascript. The main benefit of using an iFrame is that its isolated from the parent page’s CSS and Javascript. So, none of that pages’ styles/scripts will affect the display of your code. You can simply serve up a regular HTML code in the iFrame.
The snippet would look something like: