-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes.txt
36 lines (31 loc) · 1.24 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
rails new famupdates -d postgresql --skip-test-unit --skip-turbolinks --skip-spring
# user auth
gem 'devise'
gem 'omniauth'
gem 'omniauth-twitter'
# user authentication
# gem 'cancancan'
bundle
rails db:setup
rails db:migrate
rails g devise:install
config/environments/development.rb:
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
rails g devise user
rails db:migrate
rails g scaffold profiles name:string bio:text
rails db:migrate
rails g migration CreateJoinTableProfilesUsers profile user
rails db:migrate
rails g scaffold statuses content:text profile:references
rails g scaffold posts content:text profile:references
rails g migration CreateJoinTableForFollowers profiles profiles
Adjusted the created migration manually, check file
rails g migration CreateJoinTableForBlocks profiles profiles
Adjusted the created migration manually, check file
rails db:migrate
TODO: Things to look at below
https://3rd-edition.railstutorial.org/book/following_users
https://www.seancdavis.com/blog/bi-directional-has-and-belongs-to-many-on-a-single-model-in-rails/
https://guides.rubyonrails.org/association_basics.html#self-joins
https://rmiverson.medium.com/allowing-users-to-follow-users-self-join-tables-in-ruby-on-rails-4595d9fb878e