Browse files

Revert "* lib/journey/route.rb: add points based on constraints and d…

…efaults."

This reverts commit 88a9296.

Reason: this has broken Rails 3-2-stable in Travis.

@tenderlove commented it was an experimental commit, so the decision to
revert. See commit comments for more on the rationale.
  • Loading branch information...
1 parent b79be7a commit 271cb2c9eacf1c8b86805b3abed3254a5d37e773 @carlosantoniodasilva carlosantoniodasilva committed Sep 5, 2012
Showing with 1 addition and 5 deletions.
  1. +0 −4 CHANGELOG.rdoc
  2. +1 −1 lib/journey/route.rb
View
4 CHANGELOG.rdoc
@@ -1,7 +1,3 @@
-Tue Aug 28 17:21:49 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-
- * lib/journey/route.rb: add points based on constraints and defaults.
-
Thu Jun 14 14:03:22 2012 Aaron Patterson <aaron@tenderlovemaking.com>
* lib/journey/formatter.rb: when generating routes, skip route
View
2 lib/journey/route.rb
@@ -58,7 +58,7 @@ def score constraints
return -1 unless (required_keys - supplied_keys).empty?
score = (supplied_keys & path.names).length
- score + constraints.find_all { |k,v| @defaults[k] == v }.length
+ score + (required_defaults.length * 2)
end
def parts

0 comments on commit 271cb2c

Please sign in to comment.