Basic site flow improvements and devise handling

This commit is contained in:
2014-07-16 11:20:11 +02:00
parent de298a529b
commit a302123c6b
20 changed files with 134 additions and 85 deletions
+5 -1
View File
@@ -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 -1
View File
@@ -1,3 +1,3 @@
class PagesController < ApplicationController
class PagesController < ::ApplicationController
include Cmtool::Includes::PagesController
end