named-routes 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/lib/named-routes/routes.rb +2 -2
- data/lib/named-routes.rb +13 -3
- metadata +1 -1
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.8
|
data/lib/named-routes/routes.rb
CHANGED
@@ -3,7 +3,7 @@ module NamedRoutes
|
|
3
3
|
class_inheritable_accessor :host, :prefix
|
4
4
|
|
5
5
|
module Definition
|
6
|
-
extend
|
6
|
+
extend NamedRoutes::Concern
|
7
7
|
|
8
8
|
module InstanceMethods
|
9
9
|
def eval(*args)
|
@@ -70,7 +70,7 @@ module NamedRoutes
|
|
70
70
|
end.join("/")
|
71
71
|
end
|
72
72
|
unless params.empty?
|
73
|
-
uri_string << "?#{params.to_param}"
|
73
|
+
uri_string << "?#{params.to_param.gsub("%5B", "[").gsub("%5D", "]")}"
|
74
74
|
end
|
75
75
|
uri_string
|
76
76
|
end
|
data/lib/named-routes.rb
CHANGED
@@ -1,7 +1,16 @@
|
|
1
1
|
require "active_support"
|
2
|
-
|
3
|
-
require "active_support/hash_with_indifferent_access"
|
4
|
-
|
2
|
+
begin
|
3
|
+
require "active_support/hash_with_indifferent_access"
|
4
|
+
rescue LoadError
|
5
|
+
require "active_support/core_ext/hash/indifferent_access"
|
6
|
+
end
|
7
|
+
begin
|
8
|
+
require "active_support/core_ext/object/to_query"
|
9
|
+
rescue LoadError
|
10
|
+
require "active_support/core_ext/object/conversions"
|
11
|
+
require "active_support/core_ext/array/conversions"
|
12
|
+
require "active_support/core_ext/hash/conversions"
|
13
|
+
end
|
5
14
|
require "active_support/core_ext/class/inheritable_attributes"
|
6
15
|
require "uri"
|
7
16
|
|
@@ -24,5 +33,6 @@ module NamedRoutes
|
|
24
33
|
end
|
25
34
|
|
26
35
|
dir = File.dirname(__FILE__)
|
36
|
+
require "#{dir}/named-routes/concern"
|
27
37
|
require "#{dir}/named-routes/routes"
|
28
38
|
require "#{dir}/named-routes/schemed_uri"
|