new type fixed

This commit is contained in:
harrybomrah committed 2012-12-03 15:44:26 +08:00
1 parent 0011fb8972
commit dc1ce37c90
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