Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. Rails.application.routes.draw do
  2. # The priority is based upon order of creation: first created -> highest
  3. priority.
  4. # See how all your routes lay out with "rake routes".
  5.  
  6. # You can have the root of your site routed with "root"
  7. # root 'welcome#index'
  8. resources :articles
  9.  
  10. root 'pages#home'
  11. get 'about', to: 'pages#about'
  12.  
  13. class ArticlesController < ApplicationController
  14. def new
  15. @article = Article.new
  16. end
  17. end
  18.  
  19. <h1>Create an article</h1>
  20. <%= form_for @article do |f| %>
  21. <% end %>
  22.  
  23. class Article
  24.  
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement