lib/active_admin/menu_collection.rb in yousty-activeadmin-1.0.4.pre vs lib/active_admin/menu_collection.rb in yousty-activeadmin-1.0.5.pre
- old
+ new
@@ -3,13 +3,10 @@
DEFAULT_MENU = :default
# A MenuCollection stores multiple menus for any given namespace. Namespaces delegate
# the addition of menu items to this class.
class MenuCollection
-
- NoMenuError = Class.new(KeyError)
-
def initialize
@menus = {}
@build_callbacks = []
@built = false
end
@@ -32,10 +29,10 @@
def fetch(menu_name)
build_menus!
@menus[menu_name] or
- raise NoMenuError, "No menu by the name of #{menu_name.inspect} in availble menus: #{@menus.keys.join(", ")}"
+ raise NoMenuError, "No menu by the name of #{menu_name.inspect} in available menus: #{@menus.keys.join(", ")}"
end
# Add callbacks that will be run when the menu is going to be built. This
# helps use with reloading and allows configurations to add items to menus.
#