Тёмный

New App? Separate Users From Accounts (from DAY ONE) 

Brian Casel
Подписаться 2,4 тыс.
Просмотров 220
50% 1

Опубликовано:

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 2   
@simomed5002
@simomed5002 4 месяца назад
Hi Brian, do you scope everything to the user account from the beginning, like for example @posts = current_account.posts instead of @posts = current_user.posts
@briancasel
@briancasel 4 месяца назад
Depends on each app. But typically I scope things to the account. Accounts “own” things. Users “access” things. Keep in mind a user might access things (posts etc) that are owned by multiple accounts.