glebtv_mongoid_userstamp 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -7
- data/lib/mongoid/userstamp/version.rb +1 -1
- data/lib/mongoid/userstamp.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a60eb2f83a4d0c48332857d952b0e33c2be7d4be
|
4
|
+
data.tar.gz: 227d128e9d64d820ab4a566bcbd3407e826bf0c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edd9e4f7c0d9df7a0ccd5b07c49e02974b29ea1cca9697f55ae4f7d5e2413f01a799769cfa8d390867ea7ee41ea24c15f237e694fb3fedfe200fca7d590e224b
|
7
|
+
data.tar.gz: e32745c00bfcb7c8e4364b56e7be9260b0a9a098c6988c1543d96240a5e914602d7971eec420c51e16921f77e1deac3abc6e8d07b0ab2991496dc08039cd2322
|
data/README.md
CHANGED
@@ -3,23 +3,22 @@
|
|
3
3
|
This fork is INCOMPATIBLE with upstream due to different default field names
|
4
4
|
|
5
5
|
This fork uses actual mongoid belongs_to relations instead of low level work with BSON fields. Primary reason for doing
|
6
|
-
this is to support eager loading for creator/updater
|
6
|
+
this is to support eager loading for creator/updater relation.
|
7
7
|
|
8
|
-
MongoidUserstamp adds stamp columns for created by and updated by
|
9
|
-
information within Rails applications using Mongoid ORM.
|
8
|
+
MongoidUserstamp adds stamp columns for created by and updated by information within Rails applications using Mongoid ODM.
|
10
9
|
|
11
10
|
## Version Support
|
12
11
|
|
13
12
|
MongoidUserstamp is tested on the following versions:
|
14
13
|
|
15
|
-
* Ruby 1.
|
16
|
-
* Rails
|
17
|
-
* Mongoid
|
14
|
+
* Ruby 2.1.2
|
15
|
+
* Rails 4
|
16
|
+
* Mongoid 4
|
18
17
|
|
19
18
|
## Install
|
20
19
|
|
21
20
|
```ruby
|
22
|
-
gem '
|
21
|
+
gem 'glebtv_mongoid_userstamp'
|
23
22
|
```
|
24
23
|
|
25
24
|
## Usage
|
data/lib/mongoid/userstamp.rb
CHANGED
@@ -6,8 +6,8 @@ module Mongoid
|
|
6
6
|
belongs_to Userstamp.config.creator_field, class_name: Userstamp.config.user_model_name
|
7
7
|
belongs_to Userstamp.config.updater_field, class_name: Userstamp.config.user_model_name
|
8
8
|
|
9
|
-
|
10
|
-
|
9
|
+
before_validation :set_updater
|
10
|
+
before_validation :set_creator
|
11
11
|
|
12
12
|
protected
|
13
13
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glebtv_mongoid_userstamp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GlebTv
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-07-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: mongoid
|