Advertisement
extreeme

Untitled

Apr 17th, 2017
535
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rails 0.47 KB | None | 0 0
  1. Arquivo onde eu tento criar
  2.  
  3. <% provide(:title, "Nova lista") %>
  4.  
  5. <%= form_for(@lista, url: menu_new_path) do |f| %> #linha do erro
  6.  
  7. <%= f.text_field :nome %></br>
  8.  
  9. <% end %>
  10.  
  11.  
  12. Controlador
  13.  
  14. class ListasController < ApplicationController
  15.  
  16.     def show
  17.         @lista = Lista.find(params[:id])
  18.     end
  19.  
  20.     def new
  21.         @lista = Lista.new
  22.     end
  23. end
  24.  
  25. Rotas
  26. get '/menu', to: 'listas#menu'
  27. get '/menu/new', to: 'listas#new_list'
  28.  
  29. Classe lista
  30. class Lista < ApplicationRecord
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement