Ror Apps And I Frames Of Other Ror Apps

THL Toolbox > Developers' Zone > Ruby On Rails Development > RoR Apps and I Frames of Other RoR Apps

RoR Apps and iFrames of Other RoR Apps

Contributor(s): Jed Verity (jev3a@virginia.edu)

All the code that a Rails app needs to display another THL Rails app within an iFrame is located in the Javascript of the main THL frame (specifically app_plug.js and class_external.js, with a minor aesthetic function in fn.js) and the thdl_integration Rails plugin.

As long as the latest version of the thdl_integration plugin has been loaded and the THL frame is being imported properly, one need only put the #iframe link somewhere on the page to have it work. (See the top of app_plug.js for the proper format of #iframe links and configurable options.)

If the styling of the iFrame looks wrong, it could be that a bad stylesheet reference is getting sent to the Rails app. Again, look at the top of app_plug.js for info about how to send stylesheets.

If the dimensions of the iFrame are wrong, they can be added to thlplug.dims_load() in app_plug.js. Eventually, it makes sense to add optional x and y args to the #iframe link.

Provided for unrestricted use by the external link: Tibetan and Himalayan Library