Re: [Rails] Re: No route matches [POST] "/home/new"

2016-01-28 Thread Mike Simkins
So something is definitely broken in your Javascripts, or the views - the scaffold code there is what I am used to seeing, just referencing the record rather than the explicit ID you pass in. I am at a loss as to why Windows is complaining when you change the name, or indeed why it would not re

[Rails] Re: No route matches [POST] "/home/new"

2016-01-28 Thread Bob Tian
Hm, I found this from stackoverflow http://stackoverflow.com/questions/7281907/rails-3-1-issue-with-javascript-include-tag-in-application-html-erb and if I remove //= require_tree and //= turbolinks then I can include application.js and the add/delete does work for scaffold, but I still cannot

[Rails] Re: No route matches [POST] "/home/new"

2016-01-28 Thread Bob Tian
I actually did not rename it to default.js, but when I try to do that and access localhost I get an error: ExecJS::ProgramError in People#index Showing: /app/views/layouts/application.html.erb where line #6 raised: TypeError: Object doesn't support this property or method and line 6 which is: <

Re: [Rails] Re: No route matches [POST] "/home/new"

2016-01-27 Thread Mike Simkins
In the delete link, you need to use the delete method-Rails now expects a delete verb, where as your code is generating a get I believe So > <%= link_to 'Delete', :controller => "people", :action > => "destroy", :id => e, :method => :delete %> Sent from my iPhone > On 27 Jan 2016, at 18:54,

Re: [Rails] Re: No route matches [POST] "/home/new"

2016-01-27 Thread Colin Law
On 27 January 2016 at 18:54, Bob Tian wrote: > Hello, thanks to you I have been able to add in the data. I also changed > and cleaned up the code and used the convention with regards to the > variables. I have another question regarding the destroy/deleting data, > when I click on delete, it direc

[Rails] Re: No route matches [POST] "/home/new"

2016-01-27 Thread Bob Tian
Hello, thanks to you I have been able to add in the data. I also changed and cleaned up the code and used the convention with regards to the variables. I have another question regarding the destroy/deleting data, when I click on delete, it directs me to show where i can view the data, but does not

[Rails] Re: No route matches [POST] "/home/new"

2016-01-27 Thread Mike
You have an error in your controller You have @article.save in the create action, rather than @input.save Additionally it is convention to use the same name of the variable as the model, so you should really use @person = Person.new, rather than @input = Person.new You can always check what r

[Rails] Re: No route matches [POST] "/home/new"

2016-01-26 Thread Bob Tian
I dont get the error, but when I try to save the data, it seems to reload the page again, and the data doesnt get saved. It doesn't appear at all when i go back to /home -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Rub