can select relection from relation db
This commit is contained in:
1 parent
0e6c75e677
commit
e143f9a345
6 files changed
+18
-20
No files matched your search
@@ -15,19 +15,14 @@
|
||||
<%= f.text_field :email %>
|
||||
</li>
|
||||
|
||||
<li class="s_grid_row">
|
||||
|
||||
<%= f.label :type%><br />
|
||||
<select name="co_author[type]" id="" class="s_grid s_grid_4">
|
||||
<%= options_for_select(
|
||||
[["朋友","朋友"],
|
||||
["學生","摯友"],
|
||||
["老師","老師"],
|
||||
["摯友","摯友"],
|
||||
["親戚","親戚"],
|
||||
["同事","同事"],
|
||||
["共同作者","共同作者"]
|
||||
])
|
||||
%>
|
||||
@co_author_relations.map do |relation|
|
||||
[relation.relation, relation.id]
|
||||
end
|
||||
)%>
|
||||
</select>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -120,13 +120,13 @@
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
|
||||
<select name="writing_journal[journal_author_type_ids][]" id="" class="s_grid s_grid_4">
|
||||
<%= options_for_select(
|
||||
@author_types.map do |author_type|
|
||||
[author_type.title, author_type.id]
|
||||
end
|
||||
)
|
||||
%>
|
||||
<select name="writing_journal[journal_author_type_ids][]" id="" class="s_grid s_grid_4">
|
||||
<%= options_for_select(
|
||||
@author_types.map do |author_type|
|
||||
[author_type.title, author_type.id]
|
||||
end
|
||||
)
|
||||
%>
|
||||
</select>
|
||||
|
||||
<select name="writing_journal[journal_paper_type_ids][]" id="" class="s_grid s_grid_2">
|
||||
|
||||
Reference in new issue
Block a user