rory 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rory/route_mapper.rb +1 -1
- data/lib/rory/version.rb +1 -1
- data/spec/fixture_app/config/routes.rb +1 -1
- metadata +1 -1
data/lib/rory/route_mapper.rb
CHANGED
@@ -20,7 +20,7 @@ module Rory
|
|
20
20
|
|
21
21
|
def match(mask, options = {})
|
22
22
|
options[:to] ||= mask.split('/').first
|
23
|
-
mask.gsub!(
|
23
|
+
mask.gsub!(/^\//, '')
|
24
24
|
regex = /^#{mask.gsub(/:([\w_]+)/, "(?<\\1>\[\^\\\/\]+)")}$/
|
25
25
|
controller, action = options[:to].split('#')
|
26
26
|
route = {
|
data/lib/rory/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Fixture::Application.set_routes do
|
2
2
|
match 'foo/:id/bar', :to => 'foo#bar', :methods => [:get, :post]
|
3
|
-
match 'foo', :to => 'monkeys', :methods => [:put]
|
3
|
+
match '/foo', :to => 'monkeys', :methods => [:put]
|
4
4
|
match 'this/:path/is/:very_awesome', :to => 'awesome#rad'
|
5
5
|
match '/', :to => 'root#vegetable', :methods => [:get]
|
6
6
|
end
|