|
|
@@ -1,7 +1,7 @@
|
|
1
|
1
|
# An Activity represents a single continuous event that the members of a group may attend.
|
|
2
|
2
|
# An Activity belongs to a group, and has many participants.
|
|
3
|
3
|
class Activity < ApplicationRecord
|
|
4
|
|
- # @!attribute public_name
|
|
|
4
|
+ # @!attribute name
|
|
5
|
5
|
# @return [String]
|
|
6
|
6
|
# a short name for the activity.
|
|
7
|
7
|
#
|
|
|
@@ -35,7 +35,7 @@ class Activity < ApplicationRecord
|
|
35
|
35
|
dependent: :destroy
|
|
36
|
36
|
has_many :people, through: :participants
|
|
37
|
37
|
|
|
38
|
|
- validates :public_name, presence: true
|
|
|
38
|
+ validates :name, presence: true
|
|
39
|
39
|
validates :start, presence: true
|
|
40
|
40
|
validate :deadline_before_start, unless: "self.deadline.blank?"
|
|
41
|
41
|
validate :end_after_start, unless: "self.end.blank?"
|