From 5d6dd8cdede36127ec2c7b33ee20431ada0761e2 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Mon, 3 Dec 2012 15:00:55 +0800 Subject: [PATCH] separate relation list from index page and render it --- app/views/desktop/co_author_relations/_show_form.html.erb | 6 ++++++ app/views/desktop/co_author_relations/index.html.erb | 8 ++------ 2 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 app/views/desktop/co_author_relations/_show_form.html.erb diff --git a/app/views/desktop/co_author_relations/_show_form.html.erb b/app/views/desktop/co_author_relations/_show_form.html.erb new file mode 100644 index 000000000..2cad8363b --- /dev/null +++ b/app/views/desktop/co_author_relations/_show_form.html.erb @@ -0,0 +1,6 @@ +<% @co_author_relations.each do |co_author_relation| %> + + <%= co_author_relation.relation %> + <%= link_to 'Destroy', desktop_co_author_relation_path(co_author_relation), confirm: 'Are you sure?', method: :delete %> + +<% end %> diff --git a/app/views/desktop/co_author_relations/index.html.erb b/app/views/desktop/co_author_relations/index.html.erb index db3bdfa9b..3ce95f0d3 100644 --- a/app/views/desktop/co_author_relations/index.html.erb +++ b/app/views/desktop/co_author_relations/index.html.erb @@ -9,10 +9,6 @@ -<% @co_author_relations.each do |co_author_relation| %> - - <%= co_author_relation.relation %> - <%= link_to 'Destroy', desktop_co_author_relation_path(co_author_relation), confirm: 'Are you sure?', method: :delete %> - -<% end %> +<%= render 'show_form'%> +