rails_wordpress 0.0.4 → 0.0.5

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: 1e61b410df441f6dd34c97e0c3cc37a57943b1c4
4
- data.tar.gz: 8f688e03a73b41edb2fa009a770ef965e172b48b
3
+ metadata.gz: 8f50a930e3d3f57a31a8ba68bd47fdf0b2f4960c
4
+ data.tar.gz: 5ee3278cc538e07aa79d275a6e88bcc9910382a5
5
5
  SHA512:
6
- metadata.gz: 1fb83d2a48c056c71fda1980c50a330bede983ba55ac3b168f8c27104f65578f9b190c485dda4aef011f45ce9e28e854d437c4709cda70aef155695e245fa426
7
- data.tar.gz: d5faf1c7ef0c95724934fce141f3aa6023a6fe3594f40075eed82df1f3df066752c494ca16f6378d0a9595571dbe8223b52cae7815e1b40683e799af012934fa
6
+ metadata.gz: 911f12cdfde197b34b0a120dc1284248ef34bdee2da35910b4c4795247a8132ae9aeeccffd96167a0c60b84e71ab6cef1930c12720689d10ba11be000b941a96
7
+ data.tar.gz: 9c6fae1c9e32e551e36c96badcbc672ef760e77878bb82af5f24f56d90aa4a4f8959b11ffdad0e1d4c23615d9172aaa7fc357d7cb00de08051d8163007a7b8ea
@@ -1,8 +1,7 @@
1
1
  module Wordpress
2
- class WpPostmeta < WpBase
2
+ class Postmeta < WpBase
3
3
  self.table_name = 'wp_postmeta'
4
4
 
5
5
  belongs_to :post
6
-
7
6
  end
8
7
  end
@@ -1,7 +1,8 @@
1
1
  module Wordpress
2
2
  class User < WpBase
3
3
  self.table_name = "wp_users"
4
-
4
+
5
5
  has_many :posts, foreign_key: :post_author
6
+ has_many :metas, class_name: "Usermeta", foreign_key: "user_id"
6
7
  end
7
8
  end
@@ -0,0 +1,8 @@
1
+ module Wordpress
2
+ class Usermeta < WpBase
3
+ self.primary_key = "umeta_id"
4
+ self.table_name = 'wp_usermeta'
5
+
6
+ belongs_to :user
7
+ end
8
+ end
@@ -16,7 +16,7 @@ module Wordpress
16
16
  has_many :relationships, foreign_key: "object_id"
17
17
  has_many :tags, class_name: "PostTag", through: :relationships, source: :taxonomy, :dependent => :destroy
18
18
  has_many :categories, class_name: "Category", through: :relationships, source: :taxonomy, :dependent => :destroy
19
- has_many :wp_postmetas, class_name: "WpPostmeta", foreign_key: "post_id"
19
+ has_many :metas, class_name: "Postmeta", foreign_key: "post_id"
20
20
 
21
21
  belongs_to :author, class_name: "User", foreign_key: "post_author"
22
22
 
@@ -1,3 +1,3 @@
1
1
  module Wordpress
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end