# How to render normal rhtml page without active record?

**URL:** <https://www.ruby-forum.com/t/how-to-render-normal-rhtml-page-without-active-record/106893>\
**Category:** Rails\
**Created:** [June 15, 2007, 4:10am UTC](https://www.ruby-forum.com/t/how-to-render-normal-rhtml-page-without-active-record/106893 "2007-06-15T04:10:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fritz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/c57346/32.png) [@fritz](https://www.ruby-forum.com/u/fritz)\
**Post date:** [June 15, 2007, 4:10am UTC](https://www.ruby-forum.com/t/how-to-render-normal-rhtml-page-without-active-record/106893/1 "2007-06-15T04:10:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![fritz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/c57346/32.png) [@fritz](https://www.ruby-forum.com/u/fritz)\
**Post date:** [June 15, 2007, 5:31am UTC](https://www.ruby-forum.com/t/how-to-render-normal-rhtml-page-without-active-record/106893/2 "2007-06-15T05:31:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fritz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/c57346/32.png) [@fritz](https://www.ruby-forum.com/u/fritz)\
**Post date:** [June 15, 2007, 5:48am UTC](https://www.ruby-forum.com/t/how-to-render-normal-rhtml-page-without-active-record/106893/3 "2007-06-15T05:48:27Z")

</div>

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. 🙂

On Jun 15, 11:31 am, Mike R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
