new type fixed

This commit is contained in:
harrybomrah authored and chris committed 2012-12-04 00:31:46 +08:00
1 parent 5d6dd8cded
commit 49d1ca6997
5 files changed
+18 -11

No files matched your search

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