active_tools 0.0.29 → 0.0.30
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f36877ba1612f7582251d82e3e92b6fa6da7d984
|
|
4
|
+
data.tar.gz: e590d9d69a3851187404b6d3e1b6174be2de860d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc1308828f61e57c76f01a5a8e7c6bae3edf10d0fde92d675235c6d0a1c9e066f51a4cbdc7f15143a7e6b5dea9f08efdf532cec57b3cb64f6b05112a871e6056
|
|
7
|
+
data.tar.gz: c9ec0279cae626e6032a89c378ca167a9803b0faf9d3819b62b64aaec90d08a23c37bb9f15b57813edfcffa6ca079f2d21ba547be9f9fa6da9bb7a431228eacd
|
|
@@ -15,9 +15,11 @@ module ActiveTools
|
|
|
15
15
|
cattr_accessor :with_permalink_options unless defined?(with_permalink_options)
|
|
16
16
|
self.with_permalink_options ||= {}
|
|
17
17
|
self.with_permalink_options[column_name] = options
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
uniqueness_options = options[:scope] ? {:scope => Array(options[:scope])} : {}
|
|
20
|
+
|
|
19
21
|
validates_presence_of column_name
|
|
20
|
-
validates_uniqueness_of column_name,
|
|
22
|
+
validates_uniqueness_of column_name, uniqueness_options
|
|
21
23
|
|
|
22
24
|
before_validation do
|
|
23
25
|
self.with_permalink_options.each do |column_name, options|
|
data/lib/active_tools/version.rb
CHANGED