Skip to content

Instantly share code, notes, and snippets.

@dstagner
Last active August 29, 2015 14:08
Show Gist options
  • Save dstagner/1e0538bf3c4c38e785c0 to your computer and use it in GitHub Desktop.
Save dstagner/1e0538bf3c4c38e785c0 to your computer and use it in GitHub Desktop.
rails-api and jbuilder not working together?

This drove me nuts! I couldn't get jbuilder to render with a rails-api app. Here's the fix:

# app/controllers/application_controller.rb
class ApplicationController < ActionController::API
  include ActionController::ImplicitRender
end

This turns rendering back on, one of the things disabled by rails-api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment