How can I embed the result of a rails view in another website?

Posted by NotDan on Stack Overflow See other posts from Stack Overflow or by NotDan
Published on 2010-03-23T18:00:36Z Indexed on 2010/03/23 18:03 UTC
Read the original article Hit count: 217

I would like to allow users to call my ruby on rails app as a service which returns a 'div' with html content in it, and embed that div into their app (which will not be a rails application).

For example, assume someone has their own php website that has a header/footer template that gets rendered, and a content area of the page that they need to fill based on some html I generate in my rails app. I would like to allow them, from php, to call to my website, get the 'div' I generate, and embed that as html in their php page.

What I'm trying to do is host a service on my site that returns some html content, but actually show that content as part of another site, so that the end user only sees the other site and never really knows about mine.

Is this possible?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about php