I've added a select box to a form partial, but unsure about how to pull the currently selected value in the database back into the select box.
Here's what I have in my partial: <%= f.select 'status', options_for_select([['Publish', 1], ['Draft', 2]], 1) %>
I know that the last "1" is currently setting the value when the page is loaded. However, I'm not sure about what to place in this position to pull the selected value out of the db. How do I go about doing this in a partial that uses new and edit methods in the controller?