Show the reason the topic couldn't be split rather than a generic error.

This commit is contained in:
Robin Ward
2014-08-11 14:42:50 -04:00
parent e564614b70
commit 21185617b0
3 changed files with 17 additions and 2 deletions

View File

@@ -275,6 +275,8 @@ class TopicsController < ApplicationController
dest_topic = move_posts_to_destination(topic)
render_topic_changes(dest_topic)
rescue ActiveRecord::RecordInvalid => ex
render_json_error(ex)
end
def change_post_owners