app/controllers/phcscriptcdnpro/application_controller.rb in phcscriptcdnpro-72.0.0 vs app/controllers/phcscriptcdnpro/application_controller.rb in phcscriptcdnpro-72.1.0
- old
+ new
@@ -1,27 +1,22 @@
module Phcscriptcdnpro
- class ApplicationController < ActionController::Base
-
- # Security Filters
- protect_from_forgery with: :exception
-
- # Load Helpers
- helper Phctitleseo::Engine.helpers
- helper Phcnotifi::Engine.helpers
- helper Phcaccountspro::Engine.helpers
-
- # Papertrail Whodunnit Username
- def user_for_paper_trail
- current_user ? current_user.username : 'Public user'
+ class ApplicationController < ActionController::Base
+
+ # Security Filters
+ protect_from_forgery with: :exception
+
+ # Load Requried Helper Files
+ helper Phccorehelpers::Engine.helpers
+ helper Phcmenus::Engine.helpers
+ helper Phctitleseo::Engine.helpers
+ helper Phcnotifi::Engine.helpers
+ helper Phcaccountspro::Engine.helpers
+
+ # Papertrail Whodunnit Username
+ def user_for_paper_trail
+ current_user ? current_user.username : 'Public user'
+ end
+
+ private
+
end
-
- private
-
- # Add Admin Only Filter
- def phc_accounts_pro_admin_only
- unless current_user.admin?
- redirect_to main_app.root_path, :alert => "Sorry Access denied."
- end
- end
-
- end
end