acts_as_enumeration 0.1.9a → 0.1.9b
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 +2 -2
- 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.9b"
|
6
6
|
class << self
|
7
7
|
|
8
8
|
def included(base)
|
@@ -74,7 +74,7 @@ module ActiveRecord
|
|
74
74
|
end.instance_eval do
|
75
75
|
define_method(key) { self.send("for_#{field}", y) }
|
76
76
|
define_method(key.camelize) { self.send("id_for_#{field}", y)}
|
77
|
-
|
77
|
+
self.const_set(key.camelize.upcase,self.send(key.camelize)) unless defined?(key.camelize.upcase)
|
78
78
|
end
|
79
79
|
end
|
80
80
|
end
|