svenfuchs / routing-filter

routing-filter wraps around the complex beast that the Rails routing system is, allowing for unseen flexibility and power in Rails URL recognition and generation.
http://www.artweb-design.de
MIT License
464 stars 84 forks source link

Journey parameters #86

Closed anitagraham closed 1 month ago

anitagraham commented 9 months ago

Running with Rails 7.1.3 and testing an active storage route I have been getting

   NoMethodError:
       undefined method `merge' for nil:NilClass
     # ./vendor/cache/ruby/3.2.0/gems/routing-filter-0.7.0/lib/routing_filter/adapters/routers/journey.rb:13:in `block in find_routes'
     # ./vendor/cache/ruby/3.2.0/gems/routing-filter-0.7.0/lib/routing_filter/adapters/routers/journey.rb:11:in `map'
     # ./vendor/cache/ruby/3.2.0/gems/routing-filter-0.7.0/lib/routing_filter/adapters/routers/journey.rb:11:in `find_routes'

Adding a default value of {} to parameters fixed this

johnnyshields commented 5 months ago

This PR should be closed in favor of https://github.com/svenfuchs/routing-filter/pull/87