Sha256: 8cd3f31b243082ee202f57346023352bcd88df1aa8c38ab7c38b4fc9c5d81445
Contents?: true
Size: 723 Bytes
Versions: 13
Compression:
Stored size: 723 Bytes
Contents
module RailsDb class ApplicationController < ActionController::Base helper :all helper_method :per_page if Rails::VERSION::MAJOR >= 4 before_action :verify_access else before_filter :verify_access end if RailsDb.http_basic_authentication_enabled http_basic_authenticate_with name: RailsDb.http_basic_authentication_user_name, password: RailsDb.http_basic_authentication_password end private def verify_access result = RailsDb.verify_access_proc.call(self) redirect_to('/', error: 'Access Denied', status: 401) unless result end def per_page params[:per_page] || session[:per_page] end end end
Version data entries
13 entries across 13 versions & 1 rubygems