lib/appscrolls/scrolls.rb in appscrolls-0.8.3 vs lib/appscrolls/scrolls.rb in appscrolls-0.8.4
- old
+ new
@@ -1,11 +1,11 @@
module AppScrollsScrolls
module Scrolls
@@categories = {}
@@list = {}
-
+
def self.add(scroll)
- AppScrollsScrolls::Scrolls.const_set ActiveSupport::Inflector.camelize(scroll.key), scroll
+ AppScrollsScrolls::Scrolls.const_set ActiveSupport::Inflector.camelize(scroll.key.gsub("-", "_")), scroll
@@list[scroll.key] = scroll
(@@categories[scroll.category.to_s] ||= []) << scroll.key
@@categories[scroll.category.to_s].uniq!
scroll
end