I'm trying to complete this tutorial : http://guides.rubyonrails.org/getting_started.html#say-hello-rails but i'm getting an error with this:
<%= form_for :article, url: articles_path do |f| %>
I have next error:
undefined local variable or method `articles_path' for #<#<Class:0x4646c28>:0x4661d30>
Extracted source (around line #1):
rake routes
:
Prefix Verb URI Pattern Controller#Action
welcome_index GET /welcome/index(.:format) welcome#index
articles_new GET /articles/new(.:format) articles#new
root GET / welcome#index`
ArcticlesController
:
class ArticlesController < ApplicationController
def new
end
def create
end
end
Help please!
I guess you forgot to add resources :articles
in your config/routes.rb
file. As it done in guide:
Blog::Application.routes.draw do
resources :articles
root 'welcome#index'
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With