Skip to content

Commit 67bae21

Browse files
committed
Simple test index page.
1 parent 3102db1 commit 67bae21

File tree

3 files changed

+11
-61
lines changed

3 files changed

+11
-61
lines changed
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
class ApplicationController < ActionController::Base
2-
# Prevent CSRF attacks by raising an exception.
3-
# For APIs, you may want to use :null_session instead.
42
protect_from_forgery with: :exception
3+
4+
def index
5+
User.first
6+
User.last
7+
render html: '<h1>Test</h1>'.html_safe
8+
end
59
end

config/routes.rb

Lines changed: 1 addition & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,3 @@
11
Rails.application.routes.draw do
2-
# The priority is based upon order of creation: first created -> highest priority.
3-
# See how all your routes lay out with "rake routes".
4-
5-
# You can have the root of your site routed with "root"
6-
# root 'welcome#index'
7-
8-
# Example of regular route:
9-
# get 'products/:id' => 'catalog#view'
10-
11-
# Example of named route that can be invoked with purchase_url(id: product.id)
12-
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
13-
14-
# Example resource route (maps HTTP verbs to controller actions automatically):
15-
# resources :products
16-
17-
# Example resource route with options:
18-
# resources :products do
19-
# member do
20-
# get 'short'
21-
# post 'toggle'
22-
# end
23-
#
24-
# collection do
25-
# get 'sold'
26-
# end
27-
# end
28-
29-
# Example resource route with sub-resources:
30-
# resources :products do
31-
# resources :comments, :sales
32-
# resource :seller
33-
# end
34-
35-
# Example resource route with more complex sub-resources:
36-
# resources :products do
37-
# resources :comments
38-
# resources :sales do
39-
# get 'recent', on: :collection
40-
# end
41-
# end
42-
43-
# Example resource route with concerns:
44-
# concern :toggleable do
45-
# post 'toggle'
46-
# end
47-
# resources :posts, concerns: :toggleable
48-
# resources :photos, concerns: :toggleable
49-
50-
# Example resource route within a namespace:
51-
# namespace :admin do
52-
# # Directs /admin/products/* to Admin::ProductsController
53-
# # (app/controllers/admin/products_controller.rb)
54-
# resources :products
55-
# end
2+
root 'application#index'
563
end

db/seeds.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# This file should contain all the record creation needed to seed the database with its default values.
22
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3-
#
4-
# Examples:
5-
#
6-
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7-
# Mayor.create(name: 'Emanuel', city: cities.first)
3+
4+
100.times do |n|
5+
User.create name: "User #{n}", email: "user#{n}@example.com"
6+
end

0 commit comments

Comments
 (0)