You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would be especially useful when a wildcard route unintentionally matches a static asset, leading to a 404 error.
For example:
classProducts::Show < BrowserAction
get "/:brand/:ref"do
product =ProductQuery.new.brand(brand).ref(ref).first
html ShowPage, product: product
endend
In this case, the route get "/:brand/:ref" matches /css/app.css, but no Product with the brand "css" and ref "app.css" exists, resulting in an Avram::RecordNotFoundError.
In Rails, this problem can be avoided by adding constraints on routes:
No description provided.
The text was updated successfully, but these errors were encountered: