Site home page


#1

Hi,

I have a really dumb qustion, but I can’t find an answer in “Agile
Rails” or
any other hand holder. And, it is a difficult topic to search for in
google.

What controller/view is used for the home page of a site? I get how to
create new controllers, but I don’t get at all how to change content on
the
home page.

thanks,
matt


#2

On 15 Dec 2005, at 04:00, matthew clark wrote:

What controller/view is used for the home page of a site? I get
how to create new controllers, but I don’t get at all how to change
content on the home page.

The one that you define in your config/routes.rb – there’s a few
comments in there which should give you a good idea about how to start.

Yours,
Craig

Craig W. | t: +44 (0)131 516 8595 | e: removed_email_address@domain.invalid
Xeriom.NET | f: +44 (0)709 287 1902 | w: http://xeriom.net


#3

On 12/14/05, Craig W. removed_email_address@domain.invalid wrote:

On 15 Dec 2005, at 04:00, matthew clark wrote:

What controller/view is used for the home page of a site? I get
how to create new controllers, but I don’t get at all how to change
content on the home page.

The one that you define in your config/routes.rb – there’s a few
comments in there which should give you a good idea about how to start.

map.connect ‘’, :controller => “default_controller”, :action =>
“default_action”

That’s what controller and action will be used when the user goes to
http://www.url.com/


#4

The four days on rails tutorial has a good example of this. Simply
add the following to your config/routes.rb file:

map.connect ‘’, :controller => ‘home’

Where ‘home’ is the name of the controller that should handle your
home page requests. HTH…

Cheers,
Mark