Yosodog / game

2 stars 1 forks source link

Added ability to search nations and alliances. #50

Closed sritz closed 6 years ago

sritz commented 7 years ago

So, I basically just did a form and have it POST, but I then redirect to a GET so that people can refresh without their browsers getting shitty with them. The parameters from the post request are basically added onto the route, so /nations/{category}/{searchterm}. I thought this would make it fairly easy for us to add more parameters in the future, like if we want them to select how many results to show then we just do /nations/{category}/{searchterm}/{results}.

Yosodog commented 7 years ago

But like why POST if you're just gonna redirect to a GET? Why not just use GET in the first place?

Yosodog commented 7 years ago
  1. All search types except nation name give some kind of exception related to not finding a model
  2. It would be nice for the dropdown to remember what your previous search category was and have that auto-filled.
  3. I wouldn't worry too much about the URL looking nice. It might be more beneficial to use normal 'get' parameters.