mardi 27 octobre 2015

Undefined method `layout' for

I have method in my class Site::BaseController < ApplicationController

before_filter :check_layout

   def check_layout
    if @user.site_theme == 'hometastic'
      layout 'hometastic'
    else
      layout 'agent'
    end
  end

When i do only

layout 'agent'  

it works perfectly

but when i added before_filter i have got undefined method layout for

Rails 3.2.16

Any suggestions? error screen

Aucun commentaire:

Enregistrer un commentaire