Answer the question
In order to leave comments, you need to log in
Why don't multiple constraints in rails routing work?
Hello.
Here is routes.rb:
Rails.application.routes.draw do
constraints Constraints::AppRouter.new('first_domain') do
...
get '/' => 'users#search', constraints: -> (request) { request.params[:q].present? }
...
end
constraints Constraints::AppRouter.new('second_domain') do
get '' => 'tech#default_action'
end
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question