lib/grape/middleware/versioner/accept_version_header.rb in grape-0.7.0 vs lib/grape/middleware/versioner/accept_version_header.rb in grape-0.8.0
- old
+ new
@@ -49,10 +49,10 @@
# By default those errors contain an `X-Cascade` header set to `pass`, which allows nesting and stacking
# of routes (see [Rack::Mount](https://github.com/josh/rack-mount) for more information). To prevent
# this behavior, and not add the `X-Cascade` header, one can set the `:cascade` option to `false`.
def cascade?
- if options[:version_options] && options[:version_options].has_key?(:cascade)
+ if options[:version_options] && options[:version_options].key?(:cascade)
!!options[:version_options][:cascade]
else
true
end
end