codeforbtv / foodrescue

2 stars 3 forks source link

preserve any entered value in "food description" in case of error #17

Open alexch opened 10 years ago

alexch commented 10 years ago

Currently if the user enters a bogus zip we redirect to the main page and the "description" field is blank. It'd be nice if we repopulated it with whatever they typed before.

Rails has some built-in ways to do this but since we're not using ActiveRecord form helpers -- just the base form_tag helper -- these may not be available. But it'd be pretty easy to stash it in the session and retrieve it (and clear it) after the redirect.