Basic site flow improvements and devise handling
This commit is contained in:
@@ -4,6 +4,10 @@ class ApplicationController < ActionController::Base
|
||||
before_action :force_reloads
|
||||
end
|
||||
layout :layout_by_resource
|
||||
#before_action do
|
||||
#flash.now[:notice] = "Test notice"
|
||||
#flash.now[:alert] = "Test alert"
|
||||
#end
|
||||
#protect_from_forgery
|
||||
|
||||
rescue_from SimplyStored::RecordNotFound, with: :show_404
|
||||
@@ -26,7 +30,7 @@ private
|
||||
I18n.locale = (params[:locale].presence || I18n.default_locale).to_sym
|
||||
end
|
||||
|
||||
def layout_by_resource
|
||||
def layout_by_resource(*args)
|
||||
#if devise_controller?
|
||||
#return 'obtain_token' if session[:user_return_to].present? # resource_name == :user ????
|
||||
#return 'theme1' if session[:supplier_return_to].present?
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
class PagesController < ApplicationController
|
||||
class PagesController < ::ApplicationController
|
||||
include Cmtool::Includes::PagesController
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user