# Frames in Rails

**URL:** <https://www.ruby-forum.com/t/frames-in-rails/144358>\
**Category:** Rails\
**Created:** [July 28, 2008, 11:34pm UTC](https://www.ruby-forum.com/t/frames-in-rails/144358 "2008-07-28T23:34:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ratcheer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/aca169/32.png) [@ratcheer](https://www.ruby-forum.com/u/ratcheer)\
**Post date:** [July 28, 2008, 11:34pm UTC](https://www.ruby-forum.com/t/frames-in-rails/144358/1 "2008-07-28T23:34:35Z")

</div>

Hi there

I’m relatively new to rails (and web development).

I want to insert a video into my site which can keep playing even when  
the user is browsing between pages. Should i do this with Frames or  
iFrames?

I tried to implement it using frames but got a little stuck…

My site has the welcome (home) page which contains no frames:  
[www.mysite.com](http://www.mysite.com) ([www.mysite.com/home/index](http://www.mysite.com/home/index)).  
Then there is the page to display once someone has logged in:  
[www.mysite.com/projects/list](http://www.mysite.com/projects/list)

All pages except the home page use the application.html.erb layout.

I’m not sure how to integrate the frames html when I am using the  
application layout.

Any help would be really appreciated.

Thanks

Tim

---

<div class="post-metadata">

**Author:** ![ratcheer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/aca169/32.png) [@ratcheer](https://www.ruby-forum.com/u/ratcheer)\
**Post date:** [July 28, 2008, 11:36pm UTC](https://www.ruby-forum.com/t/frames-in-rails/144358/2 "2008-07-28T23:36:17Z")

</div>

On Mon, Jul 28, 2008 at 4:34 PM, Tim C.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’m not sure how to integrate the frames html when I am using the  
> application layout.

Use another layout.

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)

---

<div class="post-metadata">

**Author:** ![ratcheer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/aca169/32.png) [@ratcheer](https://www.ruby-forum.com/u/ratcheer)\
**Post date:** [July 28, 2008, 11:54pm UTC](https://www.ruby-forum.com/t/frames-in-rails/144358/3 "2008-07-28T23:54:26Z")

</div>

Regardless of what I call the layout file, I still dont know how to make  
this work.

I was thinking of making my application.html.erb something like this:

 Title \<%= stylesheet\_link\_tag 'style' %\> \<%= javascript\_include\_tag :defaults %\>

Unfortunately this is just rendering a blank frame.  
I have a whole bunch of other stuff I need to include like headers and  
footers which also previously went in application.html.erb, but I am  
unsure where to put that code now. How do I still include them?

Thanks

Tim

---

<div class="post-metadata">

**Author:** ![ratcheer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/aca169/32.png) [@ratcheer](https://www.ruby-forum.com/u/ratcheer)\
**Post date:** [July 29, 2008, 12:07am UTC](https://www.ruby-forum.com/t/frames-in-rails/144358/4 "2008-07-29T00:07:27Z")

</div>

Also, is frames even the best way to do this??  
I did a little test and it seems the URL will not change as I browse  
through my site when I am using frames. It will only keep original page  
with the frameset in the URL bar rather than the URL of the individual  
active frame.  
Surely there is a better way of doing this?
