Skip to content

Commit

Permalink
Show currently selected value when editing a Select field
Browse files Browse the repository at this point in the history
  • Loading branch information
Jberlinsky committed Jan 19, 2016
1 parent 2c4ed97 commit 01bc9ac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/views/fields/select/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ to be displayed on a resource's edit form page.
<div class="field-unit__field">
<%= f.select(
field.attribute,
options_from_collection_for_select(field.selectable_options, :to_s, :to_s)
options_from_collection_for_select(
field.selectable_options,
:to_s,
:to_s,
field.data.presence,
)
) %>
</div>

0 comments on commit 01bc9ac

Please sign in to comment.