Class: Group

Inherits:
ApplicationRecord show all
Defined in:
app/models/group.rb

Overview

This model manage the group

Relations

has many Fact has and belongs to many User

Validates

Instance Attribute Summary collapse

Instance Attribute Details

#titleString

Returns group title.

Returns:

  • (String)

    group title


11
12
13
14
15
16
# File 'app/models/group.rb', line 11

class Group < ApplicationRecord
  has_and_belongs_to_many :users
  has_many :facts

  validates :title, presence: true
end