basic layout template

This commit is contained in:
Min Zeya Phyo
2017-04-05 08:24:21 +06:30
parent bcdce092cc
commit 0ddc7bdb44
66 changed files with 7049 additions and 48 deletions

View File

@@ -1,3 +1,25 @@
class ApplicationController < ActionController::Base
#before_action :check_installation
protect_from_forgery with: :exception
helper_method :current_company
#this is base api base controller to need to inherit.
#all token authentication must be done here
#response format must be set to JSON
def current_company
begin
return Company.first
rescue
return nil
end
end
private
def check_installation
if current_company.nil?
redirect_to install_path
end
end
end