Forum: Ruby on Rails One RHTML file

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F3257c8f241ffab719520d71539fe879?d=identicon&s=25 Dave Waller (maxgusdad)
on 2006-05-31 13:56
I am making a simple app which has just a few screens and I would like
to do it with a single html file.

The file has all of the difffernt componants of each screen in hidden
div's which I want to make visible and place as the visitor moves
through the site.

I can see that RoR has the ability but I am not quite getting it.

The path is roughly login -> modify account -> submit data -> alter data
-> logout

pretty straight forward.

Instead of having each of the views seperate is ther ea way to make them
all the same and just turn on or off the needed div's?

thanks for any input.
89d967359903c639d31e4cad4569f537?d=identicon&s=25 Charlie Bowman (Guest)
on 2006-05-31 14:02
(Received via mailing list)
I would set up a partial for each componant you need to display, then
use ajax and rjs to update the page with the relevant partial.  I think
it's going to get confusing later if you have too much data in a single
view.

On Wed, 2006-05-31 at 13:56 +0200, Dave Waller wrote:

> -> logout
>
> pretty straight forward.
>
> Instead of having each of the views seperate is ther ea way to make them
> all the same and just turn on or off the needed div's?
>
> thanks for any input.


Charlie Bowman
http://www.recentrambles.com
Da828b27a295fe67c31a4d64f751d6cd?d=identicon&s=25 Victor Fan (victorfan88)
on 2006-05-31 16:54
Dave Waller wrote:
> I am making a simple app which has just a few screens and I would like
> to do it with a single html file.
>
> The file has all of the difffernt componants of each screen in hidden
> div's which I want to make visible and place as the visitor moves
> through the site.
>
> I can see that RoR has the ability but I am not quite getting it.
>
> The path is roughly login -> modify account -> submit data -> alter data
> -> logout
>
> pretty straight forward.
>
> Instead of having each of the views seperate is ther ea way to make them
> all the same and just turn on or off the needed div's?
>
> thanks for any input.

Hi Dave,

What I would do is render a partial in the <div></div> using AJAX.
Which means you have one main html file e.g. index.rhtml that some other
partial pages e.g. _mod_account.rhtml, _alter_data.rhtml.
Da828b27a295fe67c31a4d64f751d6cd?d=identicon&s=25 Victor Fan (victorfan88)
on 2006-05-31 16:55
Dave Waller wrote:
> I am making a simple app which has just a few screens and I would like
> to do it with a single html file.
>
> The file has all of the difffernt componants of each screen in hidden
> div's which I want to make visible and place as the visitor moves
> through the site.
>
> I can see that RoR has the ability but I am not quite getting it.
>
> The path is roughly login -> modify account -> submit data -> alter data
> -> logout
>
> pretty straight forward.
>
> Instead of having each of the views seperate is ther ea way to make them
> all the same and just turn on or off the needed div's?
>
> thanks for any input.

Hi Dave,

What I would do is render a partial in the <div></div> using AJAX.
Which means you have one main html file e.g. index.rhtml that some other
partial pages e.g. _mod_account.rhtml, _alter_data.rhtml.

Hope this help

Victor
This topic is locked and can not be replied to.