lib/riveter/enumerated.rb in riveter-0.8.2 vs lib/riveter/enumerated.rb in riveter-0.8.3

- old
+ new

@@ -2,10 +2,10 @@ module Enumerated extend ActiveSupport::Concern included do - const_names = self.constants(false).freeze + const_names = self.constants(false).sort.freeze const_values = const_names.collect {|name| self.const_get(name) }.freeze # create hashes for decoding names and values const_value_lookup ||= const_names.inject({}) {|list, name| list[name] = self.const_get(name)