I have the following code on the server side which renders a JSON.
render json: {status: 1}, status: :ok
I would like to add support for rendering JSONP, how do I do that ?
I've tried the following code & it didn't work:
render :json => {status: 1}, :jsonp => params[:jsonp], :status => :ok
Edit:
I'm getting now the error: 'because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled.
'
How do I tell rails to server application/javascript then ?