wpdb_activerecord 1.05 → 1.06

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
  SHA1:
3
- metadata.gz: 76dddf73540269d61aa4d20d085f0c42082b1249
4
- data.tar.gz: 297cf92b16e4397ae181fe164dbeda860045718a
3
+ metadata.gz: 331b187548fd9440d1e0472cd112eb6e79fe6dc3
4
+ data.tar.gz: 29f2871dee8f07209d6d176bd46987b672668c3d
5
5
  SHA512:
6
- metadata.gz: e1fde98b5fa0f3c7f54b0d4f68e114f20a82a8729ad7d04af9b848988d588291554491df512699a4e6aa0404c9866c1a091c233edcc37fb2dd1dac5a4b70c36c
7
- data.tar.gz: 83245acf24d0e6315f7888a34a5fcae5763fe184f07df053b85fe837c8a885674a4eee1fcfdba555f9767fabba7acce662fd4d5f0225a3406f8d74203b702878
6
+ metadata.gz: af34e58928e3168b4d501db29e4aa2e0c2f672752b60226546b11423bff50693bf0a2050885105ef38968653aabe19adb370bdf0fce7bf463c04c1f5283542a8
7
+ data.tar.gz: a4dae2baea64c479c317b3004d82a6d300b3cc24d67c0baf811206c5fa7a9c6a86bdc0813465d5396a2df89bf2bb0bb819f3ff47a577dd55338c08ad014ca53a
@@ -17,5 +17,17 @@ module WPDB
17
17
  has_many :attachments, -> { where(post_type: "attachment") }, foreign_key: "post_parent", class_name: WPDB.configuration.post_class
18
18
  has_many :revisions, -> { where(post_type: "revision") }, foreign_key: "post_parent", class_name: WPDB.configuration.post_class
19
19
  has_many :postmetas, foreign_key: "post_id", class_name: WPDB.configuration.postmeta_class
20
+
21
+ private
22
+
23
+ if Rails.gem_version >= Gem::Version.new("5.1.0")
24
+ def self.timestamp_attributes_for_update
25
+ super << "post_modified"
26
+ end
27
+ else
28
+ def timestamp_attributes_for_update
29
+ super << :post_modified
30
+ end
31
+ end
20
32
  end
21
33
  end
@@ -1,3 +1,3 @@
1
1
  module WpdbActiverecord
2
- VERSION = "1.05"
2
+ VERSION = "1.06"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wpdb_activerecord
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.05'
4
+ version: '1.06'
5
5
  platform: ruby
6
6
  authors:
7
7
  - hothero
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-22 00:00:00.000000000 Z
11
+ date: 2018-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: php-serialize
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  version: '0'
112
112
  requirements: []
113
113
  rubyforge_project:
114
- rubygems_version: 2.6.11
114
+ rubygems_version: 2.6.13
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: A ActiveRecord ORM wrapper for WordPress