wpdb_activerecord 1.0 → 1.01
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/term_relationship.rb +2 -0
- data/lib/wpdb_activerecord/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89ada5768afcc74d72709b47c7c6bb191a137636
|
4
|
+
data.tar.gz: a38cd0cbfa8866f590d01787096652530e80598c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f378ca3abc2fff707c72b5ba4aa06a08200c7750b6d397c44b9bd47c0b2500a6d1511509ccd661b6c30b6356f8815b7eb47386303eed508f7a8387115a5c75a
|
7
|
+
data.tar.gz: b155fe986701efe4d1a7171c13dea056fdcf8650896430d1d93fe52101aacbcc718c6770238ba3b98c21ed622be5c4c420ce2ef7758a590aa2e04153352f8ec6
|
@@ -4,7 +4,9 @@ module WPDB
|
|
4
4
|
self.primary_key = :object_id
|
5
5
|
|
6
6
|
belongs_to :term_taxonomy, foreign_key: "term_taxonomy_id", class_name: WPDB.configuration.term_taxonomy_class
|
7
|
+
has_one :term, :through => :term_taxonomy, class_name: WPDB.configuration.term_class
|
7
8
|
|
8
9
|
belongs_to :post, foreign_key: "object_id", class_name: WPDB.configuration.post_class
|
10
|
+
has_many :postmetas, foreign_key: "post_id", primary_key: "object_id", class_name: WPDB.configuration.postmeta_class
|
9
11
|
end
|
10
12
|
end
|