How to render normal rhtml page without active record?

hi all, I’m very new to RoR and need some help over here.

from what i learnt from the tutorials, I understand that it’s very
easy to create, update, update, and delete data to and from the DB and
load everything to the ‘view’ rhtml pages. but now i’m confused when i
only want to load a normal home page that will not access any data
from the DB. must I create the active record as well?

any suggestion is appreciated.

fRitZ wrote:

hi all, I’m very new to RoR and need some help over here.

from what i learnt from the tutorials, I understand that it’s very
easy to create, update, update, and delete data to and from the DB and
load everything to the ‘view’ rhtml pages. but now i’m confused when i
only want to load a normal home page that will not access any data
from the DB. must I create the active record as well?

any suggestion is appreciated.

Here is what you can do:

If you are trying to do this for your default home page you must do the
following:
a) delete the index.html page in your public directory, go into your
routes.rb file and set up a route to the page you would like the default
page to be:

Here is what I did:
map.connect ‘’, :controller => “index”, :action=>“index”

What this means is for the default page redirect the request to the
index controller and look for the index method. You will have to set up
a index.rhtml page in the view directory called index.

If you are just trying to do this for any page:
set up a controller (call it whatever you would like). Inside your
controller create a method (call it whatever you would like also). Then
create a page in your view folder that matches the method name in your
controller that you created.

Hope this helps. If not, let me know.
thanks.
Mike

wow, thx for the reply. i guess it gives me some enlightment. yes, i
was referring to some kind of index or home page. i will try it once i
reach home. may need further help later on. :slight_smile:

On Jun 15, 11:31 am, Mike R. [email protected]