lib/menu_builder/controller.rb in menu_builder-0.3.1 vs lib/menu_builder/controller.rb in menu_builder-0.3.2

- old
+ new

@@ -1,10 +1,17 @@ module MenuBuilder module Controller + extend ActiveSupport::Concern def menu_item(name, options = {}) - before_filter(options) do |controller| - controller.instance_variable_set('@menu_item', name) + instance_variable_set('@menu_item', name) + end + + module ClassMethods + def menu_item(name, options = {}) + before_filter(options) do |controller| + controller.instance_variable_set('@menu_item', name) + end end end end end