Column | Type | Options |
---|---|---|
string | null: false | |
password | string | null: false |
username | string | null: false |
- has_many :groups_users
- has_many :comments
- has_many groups through:groups_users
Column | Type | Options |
---|---|---|
name | string | null: false |
- has_many :groups_users
- has_many :comments
- has_many users through:groups_users
Column | Type | Options |
---|---|---|
user_id | integer | null: false, foreign_key: true |
group_id | integer | null: false, foreign_key: true |
- belongs_to :group
- belongs_to :user
Column | Type | Options |
---|---|---|
text | string | null: false |
image | string | null: false |
user_id | integer | null: false, foreign_key: true |
group_id | integer | null: false, foreign_key: true |
- belongs_to :user
- belongs_to :group