Hi,
I've got routes similar to this:
scope :constraints => Subdomain.new do
root :to => "something#index", :constraints => Authenticated.new(true)
root :to => "other#index"
end
The problem is that the constraint in the inner route seems to overwrite the constraint defined for the scope. Is there some way to merge them? For now I've created a wrapper class for constraints where I can pass a list of constraints and it just checks if every constraint.matches? returns true, but I have to repeat all the constraints defined previously:
scope :constraints => Subdomain.new do
root :to => "something#index", :constraints => Wrapper.new([Subdomain.new, Authenticated.new(true)])
root :to => "other#index"
end
and that sucks. Is there a way to somehow merge such constraints instead of repeating them like that?