can display relation between author

This commit is contained in:
Rueshyna committed 2012-12-03 17:16:28 +08:00
1 parent 6d2fa673c7
commit 5660ff8f03
5 files changed
+22 -7

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@
<%= f.label :type%><br />
<select name="co_author[type]" id="" class="s_grid s_grid_4">
<select name="co_author[co_author_relations_id]" id="" class="s_grid s_grid_4">
<%= options_for_select(
@co_author_relations.map do |relation|
[relation.relation, relation.id]
+2 -1
View File
@@ -17,7 +17,8 @@
<tr>
<td><%= co_author.co_author %></td>
<td><%= co_author.email %></td>
<td><%= co_author.type%></td>
<td><%= @co_author_relations.find(co_author.co_author_relations_id).relation \
unless co_author.co_author_relations_id.nil?%></td>
<td><%= link_to 'Edit', edit_desktop_co_author_path(co_author), :class => "bt-edit" %></td>
<td><%= link_to 'Destroy', desktop_co_author_path(co_author), method: :delete, confirm: 'Are you sure?', :class=>"bt-delete" %></td>
</tr>