One RHTML file


#1

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.


#2

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 B.
http://www.recentrambles.com


#3

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

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.

#4

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

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