Here's the route:
get "search(/:search)", to: "posts#index", as: :search
Now if I'm at /search/somethingsomething
and the view is:
- if current_page?(search_path)
= (do something)
then that something isn't being done. If I remove the parenthesis around :search
, however (i.e. get "search/:search" ...
), then it works. What gives?