uidable 2.0.0 → 2.0.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 +4 -4
- data/CHANGELOG.md +11 -0
- data/Gemfile +1 -1
- data/lib/uidable.rb +2 -2
- data/lib/uidable/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6c9309a70cd811148afd4977585e415dc7baf0a5
|
|
4
|
+
data.tar.gz: e6577baa0b5e920107b5978682fcaf8d71bc368a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 256a94396797059b8dc7b0372ef9b9427b0c964cd6930c212b9de290fc3c10d69eaec1992de18012c12a5f8e8edd31228abf9ee6d231d34e65706b668771b152
|
|
7
|
+
data.tar.gz: 2a01dcc4c05b517a4321d657abb0ecdc29f5d74737514cbe89cf3422de02f30d250298af4c0c309e9b4f325560eba12c227357ae914dcfa221593f10235257ea
|
data/CHANGELOG.md
ADDED
data/Gemfile
CHANGED
data/lib/uidable.rb
CHANGED
|
@@ -35,8 +35,8 @@ module Uidable
|
|
|
35
35
|
set_to_param: false,
|
|
36
36
|
scope: false)
|
|
37
37
|
unless uidable_cols.include?(uid_name.to_sym)
|
|
38
|
-
uniqueness_check = case (uniqueness.to_sym)
|
|
39
|
-
when :create then "base.validates :'#{uid_name}', uniqueness: true, on: :create"
|
|
38
|
+
uniqueness_check = case (uniqueness.to_s.to_sym)
|
|
39
|
+
when :create, :true then "base.validates :'#{uid_name}', uniqueness: true, on: :create"
|
|
40
40
|
when :always then "base.validates :'#{uid_name}', uniqueness: true"
|
|
41
41
|
else ''
|
|
42
42
|
end
|
data/lib/uidable/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: uidable
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sibevin Wang
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-08-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -49,6 +49,7 @@ extra_rdoc_files: []
|
|
|
49
49
|
files:
|
|
50
50
|
- ".gitignore"
|
|
51
51
|
- ".rspec"
|
|
52
|
+
- CHANGELOG.md
|
|
52
53
|
- CODE_OF_CONDUCT.md
|
|
53
54
|
- Gemfile
|
|
54
55
|
- LICENSE.txt
|
|
@@ -78,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
78
79
|
version: '0'
|
|
79
80
|
requirements: []
|
|
80
81
|
rubyforge_project:
|
|
81
|
-
rubygems_version: 2.4.
|
|
82
|
+
rubygems_version: 2.4.8
|
|
82
83
|
signing_key:
|
|
83
84
|
specification_version: 4
|
|
84
85
|
summary: Create the uid attribute in your model or class.
|