Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Rails.application.routes.draw do
- # The priority is based upon order of creation: first created -> highest
- priority.
- # See how all your routes lay out with "rake routes".
- # You can have the root of your site routed with "root"
- # root 'welcome#index'
- resources :articles
- root 'pages#home'
- get 'about', to: 'pages#about'
- class ArticlesController < ApplicationController
- def new
- @article = Article.new
- end
- end
- <h1>Create an article</h1>
- <%= form_for @article do |f| %>
- <% end %>
- class Article
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement