Sha256: cd9ec6acdcc2a2ab0e9912e2e1b654e16de88f88e4b5bea043284ad8aa44a817
Contents?: true
Size: 739 Bytes
Versions: 9
Compression:
Stored size: 739 Bytes
Contents
module NdrError # Global controller logic class ApplicationController < ActionController::Base before_action :authenticate # Ensure Rails doesn't find any host layouts first: layout 'ndr_error/ndr_error' helper NdrUi::BootstrapHelper private def authenticate return if NdrError.check_current_user_authentication.call(self) flash[:error] = 'You are not authenticated.' redirect_to main_app.url_for('/') end # Split out delimited search terms of more than 3 characters in length. def extract_keywords(query, split_on_space = true) splitter = split_on_space ? %r{[,;\\/\s]+} : %r{[,;\\/]+} (query || '').split(splitter).reject { |k| k.length < 3 } end end end
Version data entries
9 entries across 9 versions & 1 rubygems