mongoid-userstamps 3.1.0 → 3.1.1

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: d1dac6e0316bd40bb00fee04954197bf457d7186
4
- data.tar.gz: 13b38ba6f7a730291c988016f7dc74768488b87b
3
+ metadata.gz: c7f207e038a61021df0b28745847fa5e2344d17c
4
+ data.tar.gz: 494f5822d0c77bd50ca469397a0c6a6ed6574f36
5
5
  SHA512:
6
- metadata.gz: 4ebf29e9719ebdef6df480d1d4232de2ca739e9866bd653eca4a20caa4ccb00f6494c085886356369fa9ebb623d9b68c31df046db3240c6ed06aa405d764c4d7
7
- data.tar.gz: eadea41c16f9b433a5befd23e89edfb192ed879666a7a73bf56c55258287a69db312b18976e725f4482f8bd3c87077180537e1f40f64978d7e8106f92cb2f11c
6
+ metadata.gz: f7db77c4a8bfe353e706916bfae63945df551dce8a98b06e629211918f90a41e56e7ce5982247a91081b977bcea059a6fbd5a56a12096ae01ce187d7b81154a4
7
+ data.tar.gz: aee949cad96f5d2f4b1f0b75270c00dc0722ac3ab5e530a4e5b9cdcf2df31d347b9c57bafc42c9e04fa1f956739dc8ddb39decc3fb0d293f4b9e2f499066debb
@@ -5,7 +5,7 @@ module Mongoid
5
5
  class Railtie < Rails::Railtie
6
6
  # Set current_user from controller reader method
7
7
  ActiveSupport.on_load :action_controller do
8
- before_filter do |c|
8
+ before_action do |c|
9
9
  Mongoid::Userstamps::Config.user_classes.each do |user_class|
10
10
  begin
11
11
  user_class.current = c.public_send(user_class.userstamps_user.reader)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Mongoid
4
4
  module Userstamps
5
- VERSION = '3.1.0'
5
+ VERSION = '3.1.1'
6
6
  end
7
7
  end
8
8
 
data/test/models/post.rb CHANGED
@@ -2,6 +2,8 @@ class Post
2
2
  include Mongoid::Document
3
3
  include Mongoid::Userstamps
4
4
 
5
+ userstamps_model.user_model = 'User'
6
+
5
7
  field :title
6
8
  end
7
9
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-userstamps
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geoffroy Planquart
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2017-01-20 00:00:00.000000000 Z
14
+ date: 2017-02-02 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: mongoid