Hi.
I’m rewriting a legacy Rails application (a web forum) in Elixir/Phoenix. This application has a route like this:
# some routes
resources "/users", UserController
scope "/:curr_forum" do
# many more routes
end
There is no way to change the URL scheme. Now my problem: I want to match the :curr_forum
route only when the :curr_forum
part matches an entry in the database. If not, it should be invalidated. The reason is that when not validating the :curr_forum
part it is to error prone, I often have routes that should not match but do nonetheless.
Any advice on how to solve this?