Sha256: 15f2166fe45e8d722de7bd49ff3acc66daae88815bb34980e81339fc322b8fd3
Contents?: true
Size: 609 Bytes
Versions: 10
Compression:
Stored size: 609 Bytes
Contents
# frozen_string_literal: true 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
10 entries across 10 versions & 1 rubygems