# How to build a welcome page?

**URL:** <https://www.ruby-forum.com/t/how-to-build-a-welcome-page/182189>\
**Category:** Rails\
**Created:** [January 24, 2010, 6:15pm UTC](https://www.ruby-forum.com/t/how-to-build-a-welcome-page/182189 "2010-01-24T18:15:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vihrao](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/f07891/32.png) [@vihrao](https://www.ruby-forum.com/u/vihrao)\
**Post date:** [January 24, 2010, 6:15pm UTC](https://www.ruby-forum.com/t/how-to-build-a-welcome-page/182189/1 "2010-01-24T18:15:53Z")

</div>

I am describing what I am trying to accomplish:  
I want to create a main welcome page. So I ran script/generate  
admin/welcome. This created welcome controller  
Then I wanted to attach this welcome controller to the main  
application.html.erb  
In the application.html.erb file I want to show a ‘login’ control and  
two action buttons: ‘suppliers’ and ‘contractors’. This means somehow  
I  
have to create three controllers: ‘login’, ‘suppliers’, and  
‘contractors’.

- Should I create all three controllers under admin?
- How to connect my welcome controller to these three controllers  
and  
get to display the application.html.erb file  
I do not know if I am thinking in the correct direction also? Please  
help?

---

<div class="post-metadata">

**Author:** ![vihrao](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/f07891/32.png) [@vihrao](https://www.ruby-forum.com/u/vihrao)\
**Post date:** [January 24, 2010, 7:03pm UTC](https://www.ruby-forum.com/t/how-to-build-a-welcome-page/182189/2 "2010-01-24T19:03:53Z")

</div>

A “welcome” controller probably shouldn’t be part of your admin  
interface…  
usually that name is used for the site landing page. Or am I  
misunderstanding the purpose of your page? Is it the main screen of your  
admin section?

A “login” controller depends on how you’re making your user accounts.  
I’m  
using AuthLogic, so I have a mapping from /login to /user\_session/new.

‘Suppliers’ and ‘contractors’ both sound like RESTful resources. You can  
just make them with the scaffold generator and then editing the views.

You don’t need to use the application layout explicitly. It’ll be used  
by  
default. See here:

> **[Layouts and Rendering in Rails — Ruby on Rails Guides](https://guides.rubyonrails.org/layouts_and_rendering.html)**
>
> Layouts and Rendering in RailsThis guide covers the basic layout features of Action Controller and Action View.After reading this guide, you will know: How to use the various rendering methods built into Rails. How to create layouts with multiple...
