Skip to content

Conversation

@byzg
Copy link

@byzg byzg commented Feb 20, 2017

Sometimes users need to have select tag like

<select name="status">
 <option value="0">Pending</option>
 <option value="1">Confirmed</option>
</select>

instead of

<select name="status">
 <option value="pending">Confirmed</option>
 <option value="confirmed">Confirmed</option>
</select>

It could be usefull when selectbox is filter-contol element, so developer need to do
Item.where(status: params[:status]) instead of Item.where(status: Item.statuses(params[:status]))

@yuri-zubov
Copy link

cool; +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants