On Sep 7, 5:51 pm, jhaagmans <[email protected]> wrote:
> Hi,
>
> I've just started my first Rails 3 stable app from scratch and still
> looking at all the changes. Most things are wonderful. However, I
> can't figure out what happened to the layout structure.
>
> In my controller:
>
> class ApplicationController < ActionController::Base
>   protect_from_forgery
>
>   layout 'application'
> end
>
> And in app/views/layouts/application.html.erb:
>
> <html>
>   <head>
>     ...
>   </head>
>   <body>
>     ...
>     <%= yield %>
>     ...
>   </body>
> </html>
>
> This is the way I did it in Rails 2.3.x. I can't find what's changed
> in Rails 3.0. All my actions are showing up without the layout.

Make sure you don't have two application.* files in the layouts
directory.  If for example you have:

layouts/application.html
layouts/application.html.erb

It will render the .html.erb first.

Also, look at the log to see what they say.  Did your old
application.html.erb get renamed during the upgrade?

Anyway, hope this helps.

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