influitive / apartment

Database multi-tenancy for Rack (and Rails) applications
2.66k stars 464 forks source link

can't use recognize_path #585

Open giovapanasiti opened 5 years ago

giovapanasiti commented 5 years ago

I need to print the controller for each path under a constraint but it isnt working

Steps to reproduce

Create a sample app with routing constraints and then just try to run

controller = Rails.application.routes.recognize_path(endpoint[1], method: endpoint[0].downcase.to_sym)[:controller]

for each element of rake routes

Expected behavior

Normally it prints the controller

Actual behavior

Routing error

System configuration

mikecmpbll commented 5 years ago

how does this relate to apartment? i don't see any apartment related code in your example and you've not provided any trace for the error indicating how apartment is involved :)