Thank you. I am new and sorry for asking complicated questions, without 
reading.

I copied the code you suggested in application.html.erb file in 
view/layouts dir in my project.
When I start the server and say http:localhost/3000 it shows default 
ruby welcome page.
- How to I display contents of application.html.erb file.
- Also what is yield(:head} and yield(:title)

When I was looking at other exmaples, they all create a model and then 
change the model.html.erb file to display as default view. But for my 
welcome page I don't have a model or a controller? So how to invoke the 
application.html.erb file



Alpha Blue wrote:
> You are going to have to start simple and understand the mechanics of 
> rails before you continue any further.
> 
> Your first item of the day should be learning more about rails:
> 
> http://guides.rubyonrails.org/
> 
> As for your question about how layouts work with rails...  Inside of 
> your app, the layouts folder contains specific layouts which act as 
> wrappers for your content.
> 
> If you just want to make it simple for starters, remove all of the 
> layouts "except" application.html.erb which will be your main wrapper 
> layout file.
> 
> Inside of this file you would place something similar:
> 
> http://gist.github.com/285321
> 
> The yield is where your content will go from your views.  This is a very 
> bare bones idea of a layout I'm showing.  It's just enough to get you 
> started though.  You'll have to go visit http://guides.rubyonrails.org/ 
> in order to read more about rails and what you want to accomplish.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to