aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/routing
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/routing')
-rw-r--r--actionpack/lib/action_controller/routing/resources.rb3
-rw-r--r--actionpack/lib/action_controller/routing/segments.rb2
2 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/routing/resources.rb b/actionpack/lib/action_controller/routing/resources.rb
index 86abb7b2f4..05c782d226 100644
--- a/actionpack/lib/action_controller/routing/resources.rb
+++ b/actionpack/lib/action_controller/routing/resources.rb
@@ -1,3 +1,6 @@
+require 'active_support/core_ext/hash/slice'
+require 'active_support/core_ext/object/try'
+
module ActionController
# == Overview
#
diff --git a/actionpack/lib/action_controller/routing/segments.rb b/actionpack/lib/action_controller/routing/segments.rb
index 4f936d51d2..2603855476 100644
--- a/actionpack/lib/action_controller/routing/segments.rb
+++ b/actionpack/lib/action_controller/routing/segments.rb
@@ -1,7 +1,7 @@
module ActionController
module Routing
class Segment #:nodoc:
- RESERVED_PCHAR = ':@&=+$,;'
+ RESERVED_PCHAR = ':@&=+$,;%'
SAFE_PCHAR = "#{URI::REGEXP::PATTERN::UNRESERVED}#{RESERVED_PCHAR}"
if RUBY_VERSION >= '1.9'
UNSAFE_PCHAR = Regexp.new("[^#{SAFE_PCHAR}]", false).freeze