mongoid-simple-userstamps 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e9dae14b747e2f9014cf5d327f82b6d877cb9e5e
4
- data.tar.gz: 056735a6f8c8b797d1c33889bc2863e7d7e116e2
3
+ metadata.gz: 7123312aed4696e240e1e23468c2454b841ba67d
4
+ data.tar.gz: 819baa4411adafdf3357a4b56a46daaadc3a3e36
5
5
  SHA512:
6
- metadata.gz: 08ec3e77b51a57cbe1c85726d8484f61a91ea3a6de90a919a87e24609b8ff26adc55436544fd6ad1add8274eb8db05e92a2dcbe477d930c5ae6d02bea4af9f83
7
- data.tar.gz: 3cfc48ddf7ee5ed014fd891928b8250a0e11655540c4e4b1dfe013638d45f12ba1717b51bce861a3afc7103a156ffded58a1fd29492626222c8ff9725961241c
6
+ metadata.gz: e3a8461955bc75e1e2d26ba54d5a9962ded5913a718b351157af9a33fa95f443ea984e8b3a0842da4daf769e0adbb5e74ebd338edca5ad65e799558d58bef0a4
7
+ data.tar.gz: 6dd9aff620666f58b06249aa042a279cc4877f8ee85904640e117ccf422b6a33216d5a41c02aa4992e5abfe46dcf4a9c3cd28a21558f3e4d0292db2818dacc98
data/README.md CHANGED
@@ -4,7 +4,7 @@ Adds stamps relations to mongoid models.
4
4
 
5
5
  ## Version Support
6
6
 
7
- Mongoid 5.x
7
+ Mongoid 5.x, 6.x
8
8
 
9
9
  ## Installation
10
10
 
@@ -45,7 +45,7 @@ Or install it yourself as:
45
45
  pòst = Post.create
46
46
  post.created_by # <User _id: 57305c268675c32e1c70a17e >
47
47
  post.updated_by # nil
48
-
48
+
49
49
  post.title = 'title'
50
50
  post.save
51
51
  post.updated_by # <User _id: 57305c268675c32e1c70a17e >
@@ -5,8 +5,8 @@ module Mongoid
5
5
  module Userstamps
6
6
  module Model
7
7
  def self.included(base)
8
- base.send(:belongs_to, :created_by, {polymorphic: true})
9
- base.send(:belongs_to, :updated_by, {polymorphic: true})
8
+ base.send(:belongs_to, :created_by, polymorphic: true, optional: true)
9
+ base.send(:belongs_to, :updated_by, polymorphic: true, optional: true)
10
10
 
11
11
  base.send(:before_create) do
12
12
  if Mongoid::Userstamps::Config.current && !self.created_by
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Userstamps
3
- VERSION = "0.1.2"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-simple-userstamps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Jurado
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-10 00:00:00.000000000 Z
11
+ date: 2017-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler