Ruby on Rails
Tuesday, October 21, 2014
On 20 October 2014 23:56, Aspiring.Student.programmer <sabrina.ncx@gmail.com> wrote:
Can you post the file db/schema.rb please.
Hey
I am adding another database to my first one and i created the html to work showing the data but when i want to create a new entry this error occurs. I have a new controller with everything in it but not sure why it doesnt work.
Do you mean a new table, rather than a new database?
ActionController::UrlGenerationError in Shopping#new
Showing C:/Sites/blog/app/views/shopping/new.html.erb where line #2 raised:
No route matches {:action=>"show", :controller=>"shopping"} missing required keys: [:id]
Extracted source (around line #2):
1 2 3 4 5 <h1>Shopping#new</h1><%= form_for @shop, url: shopping_path do |f| %>
Can you post the file db/schema.rb please.
By the way, it is generally better to copy/paste the error from the terminal window rather than post the html. It should also be in development.log.
Colin
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsDYSW_zUZ1nVTMeNsfpSDTOtQSrUvquGJAMNTaRLZEAw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment