「Tep8」を編集中
この編集を取り消せます。
下記の差分を確認して、本当に取り消していいか検証してください。よろしければ変更を保存して取り消しを完了してください。
最新版 | 編集中の文章 | ||
1行目: | 1行目: | ||
[[category:memo|{{PAGENAME}}]] | [[category:memo|{{PAGENAME}}]] | ||
== 準備 == | == 準備 == | ||
− | |||
− | |||
== create application == | == create application == | ||
% rails new . --css=tailwind --css=sass --javascript=esbuild --database=postgresql | % rails new . --css=tailwind --css=sass --javascript=esbuild --database=postgresql | ||
15行目: | 13行目: | ||
% bin/setup | % bin/setup | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== user == | == user == | ||
27行目: | 19行目: | ||
<nowiki>% bin/rails generate devise User | <nowiki>% bin/rails generate devise User | ||
− | + | Confirmableをコメントアウトする | |
% bin/rails db:migrate</nowiki> | % bin/rails db:migrate</nowiki> | ||
36行目: | 28行目: | ||
Viewの追加 | Viewの追加 | ||
rails generate devise:views users | rails generate devise:views users | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== home == | == home == | ||
110行目: | 84行目: | ||
application.register("hello", HelloController)</nowiki> | application.register("hello", HelloController)</nowiki> | ||
− | == | + | == 見出しタイトル == |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
% rails generate scaffold NameList name:string kana:string head:boolean line:integer buddhist_name:string alive:boolean birth:string death:string g_age:string memo:text generation:string | % rails generate scaffold NameList name:string kana:string head:boolean line:integer buddhist_name:string alive:boolean birth:string death:string g_age:string memo:text generation:string | ||
181行目: | 105行目: | ||
bin/rails db:seed | bin/rails db:seed | ||
+ | |||
+ | == note == | ||
+ | % rails generate scaffold Note name:string kind:integer line:integer | ||
== user == | == user == | ||
201行目: | 128行目: | ||
notes_path | notes_path | ||
end</nowiki> | end</nowiki> | ||
+ | |||
+ | == company == | ||
+ | % rails generate model Company name | ||
+ | |||
+ | 関連付け | ||
+ | % bin/rails generate migration add_company_reference_to_notes company:references | ||
+ | % bin/rails generate migration add_company_reference_to_users company:references | ||
+ | % bin/rails generate migration add_note_reference_to_name_list note:references | ||
+ | |||
+ | bin/rails db:drop db:create db:migrate | ||
+ | |||
+ | % rails generate controller Companies new create |