From c59c772b55c47b3e633a5005cd41bb243b9418e8 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Thu, 6 Dec 2012 11:56:47 +0800 Subject: [PATCH] fixed edit and new page of co-author --- app/views/desktop/co_authors/edit.html.erb | 2 +- app/views/desktop/co_authors/new.html.erb | 2 +- spec/requests/desktop/co_authors_pages.spec.rb | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 spec/requests/desktop/co_authors_pages.spec.rb diff --git a/app/views/desktop/co_authors/edit.html.erb b/app/views/desktop/co_authors/edit.html.erb index b2581353..015f6321 100644 --- a/app/views/desktop/co_authors/edit.html.erb +++ b/app/views/desktop/co_authors/edit.html.erb @@ -1,3 +1,3 @@ -<%= form_for @co_author_relation, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: desktop_co_author_path(@co_author_relation) do |f| %> +<%= form_for @co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: desktop_co_author_path(@co_author) do |f| %> <%= render partial: 'desktop/co_authors/form', locals: {:f => f} %> <% end %> diff --git a/app/views/desktop/co_authors/new.html.erb b/app/views/desktop/co_authors/new.html.erb index 3fd7d2e1..1a4ec2d5 100644 --- a/app/views/desktop/co_authors/new.html.erb +++ b/app/views/desktop/co_authors/new.html.erb @@ -1,3 +1,3 @@ <%= form_for @co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: desktop_co_authors_path do |f| %> - <%= render partial: 'desktop/co_author_relations/form', locals: {:f => f} %> + <%= render partial: 'desktop/co_authors/form', locals: {:f => f} %> <% end %> diff --git a/spec/requests/desktop/co_authors_pages.spec.rb b/spec/requests/desktop/co_authors_pages.spec.rb new file mode 100644 index 00000000..ae3f34ce --- /dev/null +++ b/spec/requests/desktop/co_authors_pages.spec.rb @@ -0,0 +1,6 @@ +require 'spec_helper' + +describe "Co-Author pages" do + subject {co-author} + +end