Permalink
Browse files

rails 2.x legacy code is removed from routes note

  • Loading branch information...
1 parent c99fd66 commit 33d8b8e919dcaf355f3d9b9b6c724b7a67c39fcc @romanvbabenko romanvbabenko committed Oct 18, 2013
Showing with 2 additions and 11 deletions.
  1. +2 −11 lib/rails-footnotes/notes/routes_note.rb
@@ -24,17 +24,8 @@ def parse_routes
name = i ? routes_with_name[i-1].to_s : ''
# Catch segments requirements
- req = {}
- if Rails.version < '3.0'
- route.segments.each do |segment|
- next unless segment.is_a?(ActionController::Routing::DynamicSegment) && segment.regexp
- req[segment.key.to_sym] = segment.regexp
- end
- [escape(name), route.segments.join, route.requirements.reject{|key,value| key == :controller}.inspect, req.inspect]
- else
- req = route.conditions
- [escape(name), route.conditions.keys.join, route.requirements.reject{|key,value| key == :controller}.inspect, req.inspect]
- end
+ req = route.conditions
+ [escape(name), route.conditions.keys.join, route.requirements.reject{|key,value| key == :controller}.inspect, req.inspect]
end
end
end

0 comments on commit 33d8b8e

Please sign in to comment.