Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ids as values #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

ids as values #36

wants to merge 1 commit into from

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