8
Desidero utilizzare Jbuilder con Rails 5.0.0.beta1.1 in modalità API. Fuori dalla scatola, non funziona, anche quando si crea la directory app/views.Fare in modo che Jbuilder funzioni con Modalità API Rails 5
Per esempio, ho:
# app/controllers/tests_controller.rb
class TestsController < ApplicationController
# The requests gets inside the action
def test
end
end
# app/views/tests/test.json.jbuilder
json.test "It works!"
L'errore che sto ottenendo è
No template found for TestsController#test, rendering head :no_content
mi sa che devo cambiare alcune cose nei file di configurazione. Cosa devo fare?
Qualsiasi aggiornamento su questo? Sto avendo lo stesso problema. –
C'è un problema aperto qui: https://github.com/rails/jbuilder/issues/317 – schmijos