Reputation: 1307
i flowed rails getting_started
in the 5.2 section “The first form”,the
http://localhost:3000/articles/new
works fine before i add form “, url: create” how can i resolve this problem?
when i add url the result is:
and the rails run environment is:
➜ blog bin/rake routes
Prefix Verb URI Pattern Controller#Action
welcome_index GET /welcome/index(.:format) welcome#index
root GET / welcome#index
articles GET /articles(.:format) articles#index
POST /articles(.:format) articles#create
new_article GET /articles/new(.:format) articles#new
edit_article GET /articles/:id/edit(.:format) articles#edit
article GET /articles/:id(.:format) articles#show
PATCH /articles/:id(.:format) articles#update
PUT /articles/:id(.:format) articles#update
DELETE /articles/:id(.:format) articles#destroy
➜ blog ruby -v
ruby 2.0.0p481 (2014-05-08 revision 45883) [x86_64-darwin13.1.0]
➜ blog sqlite3 --version
3.7.13 2012-07-17 17:46:21 65035912264e3acbced5a3e16793327f0a2f17bb
➜ blog rails --version
Rails 4.2.1
Upvotes: 0
Views: 41
Reputation: 3587
If you are just scaffolding, you are answer should be more simple:
<%= form_for @article do |f| %>
Your form should work now...
Upvotes: 0