acts_as_enum 1.1.3 → 1.1.4
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/VERSION +1 -1
- data/lib/acts_as_enum.rb +3 -3
- 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: 0a87f2bd8780caf1086788662de93139dd7b372d
|
4
|
+
data.tar.gz: fe4800482f012175e35df285ab932a1cf0a17406
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db904a20debad9bb82f9b7aa710237036366639a414f929d941c6b8aff9bbf6e79e6a7b216bb2e48ba5f2cf71c0aacb99a9878f3e1d1dd78418c2e1d63702912
|
7
|
+
data.tar.gz: 58c41173581530a1b8cf0d2c7785f0f93a1e686d584b75d0529c8788e4014a555b54213252b290e49129b0d604d6aa4076573b44a9ba7d934e9a7e906dfa4e9f
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.4
|
data/lib/acts_as_enum.rb
CHANGED
@@ -51,9 +51,9 @@ module ActsAsEnum
|
|
51
51
|
plural_upcase_attr = attr.pluralize.upcase
|
52
52
|
enum = options[:in]
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
|
54
|
+
raise "Can not load Rails." unless defined?(Rails)
|
55
|
+
raise "Options :in can not be empty." if enum.blank?
|
56
|
+
raise "Options :in must be an object of Array or Hash." unless enum.is_a?(Array) or enum.is_a?(Hash)
|
57
57
|
|
58
58
|
if enum.is_a?(Hash)
|
59
59
|
enum = enum.to_a
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_enum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Liang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: For multiple values activerecord attributes. This gem have some very
|
14
14
|
useful methods and constants for attribute.
|