diff --git a/app/models/curation_post_section.rb b/app/models/curation_post_section.rb
index a3e648e..e168da3 100644
--- a/app/models/curation_post_section.rb
+++ b/app/models/curation_post_section.rb
@@ -7,7 +7,12 @@ class CurationPostSection
field :section_type
field :text, localize: true
field :universal_table
- field :table_entries, type: Array, default: []
+ field :table_entries
belongs_to :curation_post
+
+ def get_table_entries
+ tids = self.table_entries.split(',')
+ TableEntry.find(tids)
+ end
end
diff --git a/app/views/admin/curations/_form_section_post.html.erb b/app/views/admin/curations/_form_section_post.html.erb
index d42530a..47299f1 100644
--- a/app/views/admin/curations/_form_section_post.html.erb
+++ b/app/views/admin/curations/_form_section_post.html.erb
@@ -38,7 +38,7 @@
<%= t("curation.section_type") %>
<%= f.select :section_type, CurationPost::SECTION_TYPES.map { |type| [t("curation.#{type}"), type] },
- { include_blank: t("curation.please_select") },
+ { include_blank: t("curation.please_select"), selected: form_section_post.section_type },
class: 'form-control' %>
@@ -55,7 +55,7 @@
<% if defined? UniversalTable %>
<%= t("curation.tables") %>
- <%= f.select :section_type, UTable.all.map { |table| [table.title, table.uid] },
+ <%= f.select :universal_table, UTable.all.map { |table| [table.title, table.uid] },
{ include_blank: t("curation.please_select") },
class: 'form-control' %>