I am working on a project with nested resources and get an error message in the step controller:
def create @step = Step.new(step_params) respond_to do |f| if @step.save f.html { redirect_to @step, notice: 'Step was successfully created.' } f.json { render action: 'show', status: :created, location: @step } else f.html { render action: 'new' } f.json { render json: @step.errors, status: :unprocessable_entity } end end end
I get an error:
undefined method 'step_url' for
My routes look like this:
root 'lists#index' resources :lists do resources :steps end
source share