Sha256: 7a4a878524d226f02373d219a18d0beaa9e93cc482329cfbc183308990fc3ccb

Contents?: true

Size: 805 Bytes

Versions: 21

Compression:

Stored size: 805 Bytes

Contents

module RedmineCrm
  module Patches
    module ApplicationControllerPatch
      def self.included(base) # :nodoc:
        base.extend(ClassMethods)
        base.class_eval do
          unloadable # Send unloadable so it will not be unloaded in development
        end
      end

      module ClassMethods
        def before_action(*filters, &block)
          before_filter(*filters, &block)
        end

        def after_action(*filters, &block)
          after_filter(*filters, &block)
        end

        def skip_before_action(*filters, &block)
          skip_before_filter(*filters, &block)
        end
      end
    end
  end
end

unless ActionController::Base.methods.include?(:before_action)
  ActionController::Base.send(
    :include,
    RedmineCrm::Patches::ApplicationControllerPatch
  )
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
redmine_crm-0.0.63 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.62 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.61 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.60 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.59 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.58 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.57 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.56 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.55 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.54 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.53 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.52 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.51 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.50 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.49 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.48 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.47 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.46 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.45 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.44 lib/redmine_crm/compatibility/application_controller_patch.rb