mongoid_userstamp 0.1.2 → 0.1.3
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.
- data/README.md +2 -2
- data/lib/mongoid/userstamp/version.rb +1 -1
- data/lib/mongoid/userstamp.rb +2 -2
- data/mongoid_userstamp.gemspec +2 -2
- metadata +3 -3
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# MongoidUserstamp [](https://secure.travis-ci.org/Langwhich/mongoid_userstamp)
|
1
|
+
# MongoidUserstamp [](https://secure.travis-ci.org/Langwhich/mongoid_userstamp)
|
2
2
|
|
3
3
|
MongoidUserstamp adds stamp columns for created by and updated by
|
4
4
|
informations within rails applications.
|
@@ -20,7 +20,7 @@ informations within rails applications.
|
|
20
20
|
c.created_column = :created_by
|
21
21
|
c.created_accessor = :creator
|
22
22
|
|
23
|
-
c.updated_column = :
|
23
|
+
c.updated_column = :updated_by
|
24
24
|
c.updated_accessor = :updator
|
25
25
|
end
|
26
26
|
|
data/lib/mongoid/userstamp.rb
CHANGED
@@ -27,15 +27,15 @@ module Mongoid
|
|
27
27
|
|
28
28
|
protected
|
29
29
|
def set_updator
|
30
|
+
return unless Mongoid::Userstamp.configuration.user_model.respond_to? :current
|
30
31
|
column = "#{Mongoid::Userstamp.configuration.updated_column.to_s}=".to_sym
|
31
|
-
return unless Mongoid::Userstamp.configuration.user_model.respond_to? column
|
32
32
|
|
33
33
|
self.send(column, Mongoid::Userstamp.configuration.user_model.current.try(:id))
|
34
34
|
end
|
35
35
|
|
36
36
|
def set_creator
|
37
|
+
return unless Mongoid::Userstamp.configuration.user_model.respond_to? :current
|
37
38
|
column = "#{Mongoid::Userstamp.configuration.created_column.to_s}=".to_sym
|
38
|
-
return unless Mongoid::Userstamp.configuration.user_model.respond_to? column
|
39
39
|
|
40
40
|
self.send(column, Mongoid::Userstamp.configuration.user_model.current.try(:id))
|
41
41
|
end
|
data/mongoid_userstamp.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "mongoid_userstamp"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Thomas Boerger", "Tim Rudat"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-05-08"
|
13
13
|
s.email = "thomas.boerger@langwhich.com"
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE.md",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid_userstamp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-05-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: mongoid
|
@@ -114,7 +114,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
114
114
|
version: '0'
|
115
115
|
segments:
|
116
116
|
- 0
|
117
|
-
hash:
|
117
|
+
hash: -2000881345986703249
|
118
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
119
|
none: false
|
120
120
|
requirements:
|