Using rails 4.1.5, if: doesn't work, I had to
if:
protect_from_forgery with: :null_session, only: Proc.new { |c| c.request.format.json? }
Using rails 4.1.5,
if:
doesn't work, I had to