From 01bc9accf456f15bb1cd48e6a7fd333f2430a59a Mon Sep 17 00:00:00 2001 From: Jason Berlinsky Date: Tue, 19 Jan 2016 14:27:25 -0500 Subject: [PATCH] Show currently selected value when editing a Select field --- app/views/fields/select/_form.html.erb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/views/fields/select/_form.html.erb b/app/views/fields/select/_form.html.erb index 3accbc7237..4ccf874644 100644 --- a/app/views/fields/select/_form.html.erb +++ b/app/views/fields/select/_form.html.erb @@ -21,6 +21,11 @@ to be displayed on a resource's edit form page.
<%= 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, + ) ) %>