mongoid_occurrences 1.0.4 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/mongoid_occurrences/occurrence/has_operators.rb +2 -2
- data/lib/mongoid_occurrences/occurrence/has_schedule.rb +2 -2
- data/lib/mongoid_occurrences/occurrence.rb +2 -2
- data/lib/mongoid_occurrences/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2a314d87b9ef1b779dd6b1d267225fa9e8d0aed71ec3cd50aa0985eb8ba18d0
|
4
|
+
data.tar.gz: 68b93f8530a9d9ee95a27819e8d1351a819080e0fd37d1aabfbf29242b9df068
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22a2554e94b5512fc9ab6393050b1c3b959a3410ceda5b31508d5b93a4164b8cb2cc1a94293f411859a2eeb58f6daf178dcb3c1a8307a2dc4b47c60c4706ec7d
|
7
|
+
data.tar.gz: 1a3b5c2b93f38e83d35558fa7d94c878b50abda16d7509657fea8b017091e7b0558720e34696c1ee1920395f97fb14b012b2168324cb31c20c76996e66f18b6f
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 1.1.0
|
4
|
+
|
5
|
+
* CHANGE: `#embedded_in_event` requires `name` (`#embedded_in_event(name, options)`)
|
6
|
+
|
3
7
|
## 1.0.4
|
4
8
|
|
5
9
|
* FIX: We rely on occurrences having their `updated_at` field touched when saving an event, which currently doesn't happen. Adding `cascade_callbacks` fixes that.
|
data/README.md
CHANGED
@@ -8,8 +8,8 @@ module MongoidOccurrences
|
|
8
8
|
end
|
9
9
|
|
10
10
|
module ClassMethods
|
11
|
-
def embedded_in_event(options = {})
|
12
|
-
super(options)
|
11
|
+
def embedded_in_event(name, options = {})
|
12
|
+
super(name, options)
|
13
13
|
|
14
14
|
include Mongoid::EnumAttribute
|
15
15
|
enum :operator, %i[append replace remove], default: :append
|
@@ -4,8 +4,8 @@ module MongoidOccurrences
|
|
4
4
|
SCHEDULE_DURATION = 1.year
|
5
5
|
|
6
6
|
module ClassMethods
|
7
|
-
def embedded_in_event(options = {})
|
8
|
-
super(options)
|
7
|
+
def embedded_in_event(name, options = {})
|
8
|
+
super(name, options)
|
9
9
|
|
10
10
|
field :schedule, type: MongoidIceCubeExtension::Schedule
|
11
11
|
field :schedule_dtstart, type: Time
|
@@ -19,12 +19,12 @@ module MongoidOccurrences
|
|
19
19
|
end
|
20
20
|
|
21
21
|
module ClassMethods
|
22
|
-
def embedded_in_event(options = {})
|
22
|
+
def embedded_in_event(name, options = {})
|
23
23
|
field :dtstart, type: DateTime
|
24
24
|
field :dtend, type: DateTime
|
25
25
|
field :all_day, type: Boolean
|
26
26
|
|
27
|
-
embedded_in
|
27
|
+
embedded_in name, class_name: options.fetch(:class_name, nil), inverse_of: :occurrences
|
28
28
|
|
29
29
|
after_validation :adjust_dates_for_all_day!, if: :changed?
|
30
30
|
|