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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e0007e69f0ddb8744ed98f777fe6c706f04488d07a8051654ed9f41502cc6c7
4
- data.tar.gz: 6dd58d07d91a1976a8e53e88db88707c9d9af8dbbb6e30b7b9fa44a30f03ea25
3
+ metadata.gz: 8b3eceac4a1719f232b34c2fca6011cef48444cfe64646109dfde436b7f12557
4
+ data.tar.gz: f9578d5f26ae5a6864dfc6a59d0cc1ff49ccd72520cb7008b0ff21fcf93fd98c
5
5
  SHA512:
6
- metadata.gz: da19962276141ae4d7df808a6766a3a3fb58b6efffa805ffe3430a1d636c8c8e817dfc99e256ecded9691f23108b067fd6af317ca7845520d94039533503587e
7
- data.tar.gz: 7d5ef5067871b2dc40bb3d7c3ebba205fb60b150019c9b5fcc713e186e65b94057b2f8ff866af097f07e345890c34e6ff806421b96647e45acbaa6d6ee4ad8c8
6
+ metadata.gz: 3a5dc2db193354a88552cefc6b07512e2d079e8a05a2ecf4ba4f32e902451950b5401930adfdf5ec8b4f2cfc1f3007b7a2542b98e6eddcaac928337369f2cb6a
7
+ data.tar.gz: 8cceee092aa705daa738624cae4c245bf969f0ee01c215b2d8a531527bd01a20a87950ebade229103e3ce3672a5b6aec3bf86ad78cc2bbc5148531ade64acf22
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Eivid
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
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.1
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-03 00:00:00.000000000 Z
11
+ date: 2021-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails