eivid 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/eivid/video.rb +7 -0
- data/lib/eivid/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b3eceac4a1719f232b34c2fca6011cef48444cfe64646109dfde436b7f12557
|
4
|
+
data.tar.gz: f9578d5f26ae5a6864dfc6a59d0cc1ff49ccd72520cb7008b0ff21fcf93fd98c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a5dc2db193354a88552cefc6b07512e2d079e8a05a2ecf4ba4f32e902451950b5401930adfdf5ec8b4f2cfc1f3007b7a2542b98e6eddcaac928337369f2cb6a
|
7
|
+
data.tar.gz: 8cceee092aa705daa738624cae4c245bf969f0ee01c215b2d8a531527bd01a20a87950ebade229103e3ce3672a5b6aec3bf86ad78cc2bbc5148531ade64acf22
|
data/app/models/eivid/video.rb
CHANGED
@@ -5,6 +5,8 @@ module Eivid
|
|
5
5
|
belongs_to :user, optional: true
|
6
6
|
has_many :video_resources
|
7
7
|
|
8
|
+
after_commit :touch_video_resources
|
9
|
+
|
8
10
|
def owner_id # required for aliassing :owner_id
|
9
11
|
super
|
10
12
|
end
|
@@ -17,5 +19,10 @@ module Eivid
|
|
17
19
|
alias_method :"#{Eivid.owner_model}", :external_owner
|
18
20
|
scope :"of_#{Eivid.owner_model}", -> (owner_id) { where(owner_id: owner_id) }
|
19
21
|
|
22
|
+
def touch_video_resources
|
23
|
+
# has_many touch implementation
|
24
|
+
video_resources.find_each { |record| record.update(updated_at: Time.now) }
|
25
|
+
end
|
26
|
+
|
20
27
|
end
|
21
28
|
end
|
data/lib/eivid/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eivid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jurriaan Schrofer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|