Skip to content

Commit

Permalink
Use render :json correctly
Browse files Browse the repository at this point in the history
DEPRECATION WARNING: `render :text` is deprecated because it does not
actually render a `text/plain` response. Switch to `render plain: 'plain
text'` to render as `text/plain`, `render html: '<strong>HTML</strong>'`
to render as `text/html`, or `render body: 'raw'` to match the
deprecated behavior and render with the default Content-Type, which is
`text/html`.
  • Loading branch information
eagletmt committed Jan 17, 2017
1 parent 34dd20c commit a505d3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/api_controller.rb
Expand Up @@ -154,7 +154,7 @@ def crawl
success = sub.feed.crawl
end
end
render text: {a: (success ? true : false) }.to_json
render json: {a: (success ? true : false) }.to_json
# render_json_status(success ? true : false)
# return render_json_status(success ? true : false)
end
Expand Down

0 comments on commit a505d3f

Please sign in to comment.