①
Terminal
rails _6.0.0_ new test -d mysql
②
Terminal
rails db:create
③
Terminal
rails g model test
④
db/migrate/2020 ・ ・ ・ ・ ・
t.string :name, null: false (The description on the line here is appropriate)
⑤
Terminal
rails db:migrate
⑥
config/routes.rb
root to tests#index (The line here is also appropriate)
⑦
Terminal
rails g controller tests
⑧
java:app/controller/tests.controller.rb
def index
@tests = Test.all
end
⑨
database.yml
utf8 ○○ ・ ・ ・ Only utf8
⑩
java:app/views/index.html.erb
Write HTML here
Recommended Posts