Merge branch 'master' of ssh://bitbucket.org/code2lab/sxrestaurant

# Conflicts:
#	Gemfile.lock
#	app/views/layouts/application.html.erb
This commit is contained in:
Min Zeya Phyo
2017-06-26 21:57:55 +06:30
128 changed files with 3988 additions and 646 deletions

View File

@@ -3,16 +3,17 @@ class ApplicationController < ActionController::Base
#before_action :check_installation
protect_from_forgery with: :exception
helper_method :current_company,:current_login_employee
helper_method :current_company,:current_login_employee,:current_user
# alias_method :current_user, :current_login_employee,:current_user
#this is base api base controller to need to inherit.
#all token authentication must be done here
#response format must be set to JSON
# rescue_from CanCan::AccessDenied do |exception|
# flash[:warning] = exception.message
# redirect_to root_path
# end
rescue_from CanCan::AccessDenied do |exception|
flash[:warning] = exception.message
redirect_to root_path
end
def current_user