# Rails application into HTML frames

**URL:** <https://www.ruby-forum.com/t/rails-application-into-html-frames/64019>\
**Category:** Rails\
**Created:** [June 21, 2006, 1:18pm UTC](https://www.ruby-forum.com/t/rails-application-into-html-frames/64019 "2006-06-21T13:18:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bex3000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bb73d2/32.png) [@bex3000](https://www.ruby-forum.com/u/bex3000)\
**Post date:** [June 21, 2006, 1:18pm UTC](https://www.ruby-forum.com/t/rails-application-into-html-frames/64019/1 "2006-06-21T13:18:02Z")

</div>

Hey,

Just hoping I can get some pointers as I am completely new to Rails and  
I have followed some tutorials to makes a database of data that I need,  
but now I am completely stuck with how to make the Rails page appear  
within my frameset. Hope that made some sense!  
Thanks!  
Bex

---

<div class="post-metadata">

**Author:** ![bex3000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bb73d2/32.png) [@bex3000](https://www.ruby-forum.com/u/bex3000)\
**Post date:** [June 21, 2006, 1:24pm UTC](https://www.ruby-forum.com/t/rails-application-into-html-frames/64019/2 "2006-06-21T13:24:37Z")

</div>

Have you managed to get your rails page to display when not in a frame?

If so, you can just set the src property of your frame to the url that  
you used to access the page when it wasn’t in a frame.

-Scott

---

<div class="post-metadata">

**Author:** ![bex3000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bb73d2/32.png) [@bex3000](https://www.ruby-forum.com/u/bex3000)\
**Post date:** [June 21, 2006, 1:28pm UTC](https://www.ruby-forum.com/t/rails-application-into-html-frames/64019/3 "2006-06-21T13:28:42Z")

</div>

So far I have the rails page displaying in ‘localhost’ how I want it to,  
but with all the project folders and files I’m a bit confused which bit  
to link into the frameset :S

Thanks for the reply!  
Bex

---

<div class="post-metadata">

**Author:** ![bex3000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bb73d2/32.png) [@bex3000](https://www.ruby-forum.com/u/bex3000)\
**Post date:** [June 21, 2006, 2:05pm UTC](https://www.ruby-forum.com/t/rails-application-into-html-frames/64019/4 "2006-06-21T14:05:06Z")

</div>

Is your frameset part of your rails app, or is you rails app just  
stuck in one frame of a bigger page?

If its the latter, just copy the localhost url your rails app is  
currently displaying on into the src property of the frame.

If its the former you will need to create a new action in your  
controller and an rhtml file to contain the frameset. This action  
should be your index. Then you can link to other parts of the app in  
your frameset by setting the src properties of the frames to the parts  
of the app you want displayed there.

You can use the url\_for helper to do this. Ie:

-Scott

---

<div class="post-metadata">

**Author:** ![bex3000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bb73d2/32.png) [@bex3000](https://www.ruby-forum.com/u/bex3000)\
**Post date:** [June 21, 2006, 2:12pm UTC](https://www.ruby-forum.com/t/rails-application-into-html-frames/64019/5 "2006-06-21T14:12:54Z")

</div>

I have a rails app and a website that I’ve coded seperately, and now I  
want the rails app to appear in the frameset as though it were just  
another html file. I’m just getting the document itself now, so the ruby  
isn’t being rendered in Firefox :S

Bex

---

<div class="post-metadata">

**Author:** ![bex3000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bb73d2/32.png) [@bex3000](https://www.ruby-forum.com/u/bex3000)\
**Post date:** [June 21, 2006, 2:26pm UTC](https://www.ruby-forum.com/t/rails-application-into-html-frames/64019/6 "2006-06-21T14:26:53Z")

</div>

Becky F. wrote:

> I have a rails app and a website that I’ve coded seperately, and now I  
> want the rails app to appear in the frameset as though it were just  
> another html file. I’m just getting the document itself now, so the ruby  
> isn’t being rendered in Firefox :S

It would be helpful to see what your frameset HTML looks like. The page  
requests for the Rails application will need to be able to run through  
your web server (that is what will ultimately pass off the parsing for  
Ruby). You can’t link to an .rhtml file, for instance, you have to link  
to a Rails URL pattern so that everything gets properly parsed.

-Curtis
