Commit cab664ce302776e7ad5b8f840a0a8d90b85937cd
1 parent
33dac88d
Exists in
master
and in
1 other branch
after saving a new idea, return it
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
app/controllers/choices_controller.rb
@@ -56,7 +56,8 @@ class ChoicesController < InheritedResources::Base | @@ -56,7 +56,8 @@ class ChoicesController < InheritedResources::Base | ||
56 | the_status = @choice.active? ? 'active' : 'inactive' | 56 | the_status = @choice.active? ? 'active' : 'inactive' |
57 | options[:builder].tag!('choice_status', the_status) } | 57 | options[:builder].tag!('choice_status', the_status) } |
58 | logger.info "successfully saved the choice #{@choice.inspect}" | 58 | logger.info "successfully saved the choice #{@choice.inspect}" |
59 | - format.xml { render :xml => @question.picked_prompt.to_xml(:methods => [:left_choice_text, :right_choice_text], :procs => [saved_choice_id, choice_status]), :status => :ok } | 59 | + format.xml { render :xml => @choice.to_xml(:procs => [saved_choice_id, choice_status]), :status => :ok } |
60 | + # format.xml { render :xml => @question.picked_prompt.to_xml(:methods => [:left_choice_text, :right_choice_text], :procs => [saved_choice_id, choice_status]), :status => :ok } | ||
60 | format.json { render :json => @question.picked_prompt.to_json, :status => :ok } | 61 | format.json { render :json => @question.picked_prompt.to_json, :status => :ok } |
61 | else | 62 | else |
62 | format.xml { render :xml => @choice.errors, :status => :unprocessable_entity } | 63 | format.xml { render :xml => @choice.errors, :status => :unprocessable_entity } |