lib/enroute/routes.rb in enroute-0.0.4 vs lib/enroute/routes.rb in enroute-0.0.5
- old
+ new
@@ -40,11 +40,11 @@
.to_s
.gsub(/_(.)/) { Regexp.last_match(1).upcase }
end
def reduce_methods(routes)
- routes.map(&:verb).flatten.map(&:downcase).uniq
+ routes.map(&:verb).flatten.map(&:downcase).uniq.reject(&:empty?)
end
def camelize_map(list)
list.map {|item| item.camelize(:lower) }
end
@@ -70,10 +70,10 @@
# Filter out unnamed routes, Rails' internal routes, and anything present
# on `:ignore`.
selected_routes.reject do |route|
route.name.nil? ||
- route.name.match?(/rails|script/) ||
+ route.name.match?(/rails|script|turbo/) ||
config.fetch(:ignore, []).include?(route.name)
end
end
def routes