In Rails 4 for some reason layouts-templates from the app/views/layouts. folder are not rendered standardly app/views/layouts. For example, the template app/views/layouts/application.html.erb not rendered. It only saves the render layout:"application" parameter in the controller actions ... this is terribly inconvenient. Is there any way to tell Rails that I NEED to render default templates ALWAYS?
thank
UPD:
1) I created a new project and the controller "hello" 2) Routing:
root "hello#index" resources :hello do get :pops, on: :collection end 3) controller actions:
class HelloController < ApplicationController def index render text: "Works" end def show render text: "Show" end def pops #render text: "Pops", layout: "application" // работает render text: "Pops" // не работает подгрузка layouts end end 4) app / views / layouts / application.html.erb:
<!DOCTYPE html> <html> <head> <title>Ror</title> <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> <%= javascript_include_tag "application", "data-turbolinks-track" => true %> <%= csrf_meta_tags %> </head> <body> <%= yield %> </body> </html> 5) when you go to the URL "hello / pops" - the template is not loaded.