acts_as_enumeration 0.1.12 → 0.1.13
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/lib/active_record/acts/enumeration.rb +3 -3
- metadata +1 -1
@@ -2,7 +2,7 @@ module ActiveRecord
|
|
2
2
|
module Acts
|
3
3
|
module Enumeration
|
4
4
|
|
5
|
-
VERSION="0.1.
|
5
|
+
VERSION="0.1.13"
|
6
6
|
class << self
|
7
7
|
|
8
8
|
def included(base)
|
@@ -69,11 +69,11 @@ module ActiveRecord
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def _camelized_key(string)
|
72
|
-
(((string.to_s=~/^[a-z_]/) && !const_defined?(string.to_s.camelize)) ? string.to_s : "_#{string.to_s}").camelize
|
72
|
+
(((string.to_s=~/^[a-z_]/) && !const_defined?(string.to_s.camelize)) ? string.to_s : "_#{string.to_s.camelize}").camelize
|
73
73
|
end
|
74
74
|
|
75
75
|
def _camelized_upcase_key(string)
|
76
|
-
(((string.to_s=~/^[a-z_]/) && !const_defined?(string.to_s.camelize.upcase)) ? string.to_s : "_#{string.to_s}").camelize.upcase
|
76
|
+
(((string.to_s=~/^[a-z_]/) && !const_defined?(string.to_s.camelize.upcase)) ? string.to_s : "_#{string.to_s.camelize}").camelize.upcase
|
77
77
|
end
|
78
78
|
|
79
79
|
portable_select(field).map { |x| normalize_intern(x.send(field)) }.each do |y|
|