Sha256: 7fc390cfa6e0546a3a64c9d8dd1a4f23b9d105e2aa5ad6e4e01b79484062892c
Contents?: true
Size: 745 Bytes
Versions: 28
Compression:
Stored size: 745 Bytes
Contents
class ApplicationController < ActionController::Base include SslRequirement helper :all protect_from_forgery acts_as_muck_content_handler layout 'default' protected # called by Admin::Muck::BaseController to check whether or not the # user should have access to the admin UI def admin_access? admin? end # only require ssl if we are in production def ssl_required? return ENV['SSL'] == 'on' ? true : false if defined? ENV['SSL'] return false if local_request? return false if RAILS_ENV == 'test' ((self.class.read_inheritable_attribute(:ssl_required_actions) || []).include?(action_name.to_sym)) && (RAILS_ENV == 'production' || RAILS_ENV == 'staging') end end
Version data entries
28 entries across 28 versions & 1 rubygems