We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a model with a type hash constant:
class Model < Granite::ORM::Base extend Query::BuilderMethods VALID_TYPES = { :one => 1, :two => 2 } end
Where the key of VALID_TYPES represents the human readable version of the mapping and the value represents what is stored in the database.
VALID_TYPES
Using this in a form with select_field like this:
select_field
== form action: "/model/new", method: :post do == csrf_tag .form_group == select_field name: :type, collection: Model::VALID_TYPES
I get a somewhat unexpected result:
<select class="monitor_type" id="monitor_type" name="monitor_type"> <option value="one">1</option> <option value="two">2</option> </select>
Am I missing something obvious, or is this backwards?
The text was updated successfully, but these errors were encountered:
@amberframework/contributors Is this already solved?
Sorry, something went wrong.
No branches or pull requests
I have a model with a type hash constant:
Where the key of
VALID_TYPES
represents the human readable version of the mapping and the value represents what is stored in the database.Using this in a form with
select_field
like this:I get a somewhat unexpected result:
Am I missing something obvious, or is this backwards?
The text was updated successfully, but these errors were encountered: