From 02c8df5beb954500e3e9cc649281f9376ecc9572 Mon Sep 17 00:00:00 2001 From: Toks Date: Mon, 8 Jul 2013 21:58:32 -0400 Subject: [PATCH] fixes #1793 --- app/controllers/comment_votes_controller.rb | 2 +- app/views/comment_votes/create.xml.erb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 app/views/comment_votes/create.xml.erb diff --git a/app/controllers/comment_votes_controller.rb b/app/controllers/comment_votes_controller.rb index ff74f5105..7fd3176aa 100644 --- a/app/controllers/comment_votes_controller.rb +++ b/app/controllers/comment_votes_controller.rb @@ -1,5 +1,5 @@ class CommentVotesController < ApplicationController - respond_to :js, :json + respond_to :js, :json, :xml before_filter :member_only def create diff --git a/app/views/comment_votes/create.xml.erb b/app/views/comment_votes/create.xml.erb new file mode 100644 index 000000000..4bdbca812 --- /dev/null +++ b/app/views/comment_votes/create.xml.erb @@ -0,0 +1,6 @@ + +<% if @comment_vote.errors.any? %> + <%= @comment_vote.errors.full_messages.to_json.html_safe %> +<% else %> + +<% end %>