fixed bug about co-author-relation

This commit is contained in:
Rueshyna 2012-12-06 15:20:06 +08:00
parent d4c6fc66d5
commit 54de86eeb4
4 changed files with 1033 additions and 12 deletions

View File

@ -25,7 +25,7 @@ class Desktop::CoAuthorRelationsController < ApplicationController
if @co_author_relation.save if @co_author_relation.save
newv = render_to_string partial: "show_form", object: @co_author_relations newv = render_to_string partial: "show_form", object: @co_author_relations
render json: {success: true, msg: "New Relation successfully saved!", newvalue: newvm}.to_json render json: {success: true, msg: "New Relation successfully saved!", newvalue: newv}.to_json
else else
error_msg = @co_author_relation.errors.full_messages.join("<br />") error_msg = @co_author_relation.errors.full_messages.join("<br />")
render json: {success: false, msg: error_msg}.to_json render json: {success: false, msg: error_msg}.to_json

1015
out Normal file

File diff suppressed because one or more lines are too long

View File

@ -3,4 +3,10 @@ require 'spec_helper'
describe "Co-Author pages" do describe "Co-Author pages" do
subject {co-author} subject {co-author}
describe "Co-Author list" do
before { visit desktop_co_authors }
it { should have_selector('h1', text: 'Sign up') }
end
end end