Sha256: aa1238d1a076fcd07a856a08c2920edc24929792bf4ae5f9adc5ba6a8c1ca8f6
Contents?: true
Size: 644 Bytes
Versions: 24
Compression:
Stored size: 644 Bytes
Contents
# frozen_string_literal: true require 'action_controller/base' module EacRailsUtils module Patches module ActionControllerBasePatch def self.included(base) base.include InstanceMethods end module InstanceMethods def redirect_back(default_path, options = {}) redirect_to :back, options rescue ActionController::RedirectBackError redirect_to default_path, options end end end end end patch = ::EacRailsUtils::Patches::ActionControllerBasePatch target = ::ActionController::Base target.send(:include, patch) unless target.included_modules.include?(patch)
Version data entries
24 entries across 24 versions & 1 rubygems