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 +4 -4
- data/lib/wpdb_activerecord/post.rb +12 -0
- data/lib/wpdb_activerecord/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 331b187548fd9440d1e0472cd112eb6e79fe6dc3
|
4
|
+
data.tar.gz: 29f2871dee8f07209d6d176bd46987b672668c3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
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:
|
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.
|
114
|
+
rubygems_version: 2.6.13
|
115
115
|
signing_key:
|
116
116
|
specification_version: 4
|
117
117
|
summary: A ActiveRecord ORM wrapper for WordPress
|