Adds better reusable error message support. Added to fetching remote

posts. /cc @riking
This commit is contained in:
Robin Ward
2014-04-02 13:22:10 -04:00
parent b250aa36a0
commit 558a06a117
6 changed files with 87 additions and 5 deletions

View File

@ -151,6 +151,8 @@ class PostsController < ApplicationController
doc.content
end
render json: {cooked: content}
rescue
render_json_error I18n.t('errors.embed.load_from_remote')
end
def recover