Sha256: 79691013d1b015413df3ae61720dae49b991279529c7c5fb2694bd383f0e549d

Contents?: true

Size: 708 Bytes

Versions: 3

Compression:

Stored size: 708 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 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

3 entries across 3 versions & 1 rubygems

Version Path
redmine_crm-0.0.42 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.41 lib/redmine_crm/compatibility/application_controller_patch.rb
redmine_crm-0.0.40 lib/redmine_crm/compatibility/application_controller_patch.rb