views:

24

answers:

1

Hello!

I created a ruby application and the application.html.erb is never loaded (looking at webrick output, I never get "Rendered CLASS/index.html.erb within layouts/application", but "Rendered CLASS/index.html.erb")

CLASS.html.erb never gets loaded either.

Only when explicitly specifying "render :file => 'layouts/application'" in the controller, application.html.erb is loaded.

Can anyone help?

Thanks a lot in advance

Sebastien

A: 

Add in your ApplicationController

layout :application

Now all of your controller use application like default layout.

shingara
class ApplicationController < ActionController::Base protect_from_forgery layout :applicationend
Sebastien
Unfortunately nothing happens...
Sebastien
Rendered plans/show.html.erb (1.0ms)
Sebastien
In another application the ApplicationController looks like that:
Sebastien
class ApplicationController < ActionController::Base protect_from_forgery end
Sebastien
and the rendering is taking application.html.erb into account
Sebastien
Thanks for the help
Sebastien