Forum: Ruby on Rails site home page

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.
69b2ef4bce76b5b27c94e898976dc6d8?d=identicon&s=25 matthew clark (Guest)
on 2005-12-15 05:01
(Received via mailing list)
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
5cfd7e9223637ea26c81c2cc3e43799e?d=identicon&s=25 Craig Webster (Guest)
on 2005-12-15 05:04
(Received via mailing list)
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 Webster | t: +44 (0)131 516 8595 | e: craig@xeriom.net
Xeriom.NET    | f: +44 (0)709 287 1902 | w: http://xeriom.net
38a8230ed3d5c685558b4f0aad3fc74b?d=identicon&s=25 Joe Van Dyk (Guest)
on 2005-12-15 05:34
(Received via mailing list)
On 12/14/05, Craig Webster <craig@xeriom.net> 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/
B6face098b18eb011597cde7bd147f4d?d=identicon&s=25 Mark Dillon (Guest)
on 2005-12-15 05:37
(Received via mailing list)
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
This topic is locked and can not be replied to.