Sha256: 780a54875e2cabca0527777cf36ff00534b2c69da4034c7bbf5a275dd84ee590
Contents?: true
Size: 812 Bytes
Versions: 1
Compression:
Stored size: 812 Bytes
Contents
module Redmineup module Patches module RoutingMapperPatch def self.included(base) base.send(:include, InstanceMethods) base.class_eval do alias_method :constraints_without_redmineup, :constraints alias_method :constraints, :constraints_with_redmineup end end module InstanceMethods def constraints_with_redmineup(options = {}, &block) options[:object_type] = /.+/ if options[:object_type] && options[:object_type].is_a?(Regexp) constraints_without_redmineup(options, &block) end end end end end unless ActionDispatch::Routing::Mapper.included_modules.include?(Redmineup::Patches::RoutingMapperPatch) ActionDispatch::Routing::Mapper.send(:include, Redmineup::Patches::RoutingMapperPatch) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
redmineup-1.0.2 | lib/redmineup/compatibility/routing_mapper_patch.rb |