I had a problem before the command "rails generate test scaffold: string names" created by such controllers:
class Teste < ApplicationController before_action :set_teste, only: [:show, :edit, :update, :destroy
I donβt know why, but now another format is being created
class TestesController < ApplicationController before_action :set_teste, only: [:show, :edit, :update, :destroy] def index @testes = Teste.all respond_with(@testes) end def show respond_with(@teste) end def new @teste = Teste.new respond_with(@teste) end def edit end def create @teste = Teste.new(teste_params) @teste.save respond_with(@teste) end def update @teste.update(teste_params) respond_with(@teste) end
What could it be? Why has this changed?
I would go back to the previous format, because my whole system is in the first format
source share