Reputation: 4248
I started my first serious rails app. I'm building a site which will need for a specific model another structure as the application.html.erb.
I'd like to have a general layout or structure as application.html.erb but for my, lets say, articles model, and then =yield
any view of that model there.
Thanks in advance.
Upvotes: 0
Views: 110
Reputation: 6805
You can use the keyword layout
to override the default layout conventions in your controllers.
following your example:
class ArticlesController < ApplicationController
layout 'articles_layout'
...
end
Upvotes: 2
Reputation: 107728
Please see the section about Nested Layouts within the Layouts and Rendering Guide.
Upvotes: 0