Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Arquivo onde eu tento criar
- <% provide(:title, "Nova lista") %>
- <%= form_for(@lista, url: menu_new_path) do |f| %> #linha do erro
- <%= f.text_field :nome %></br>
- <% end %>
- Controlador
- class ListasController < ApplicationController
- def show
- @lista = Lista.find(params[:id])
- end
- def new
- @lista = Lista.new
- end
- end
- Rotas
- get '/menu', to: 'listas#menu'
- get '/menu/new', to: 'listas#new_list'
- Classe lista
- class Lista < ApplicationRecord
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement