8000 Merge pull request #3855 from davydovanton/block · stephancom/activeadmin@908e38d · GitHub
[go: up one dir, main page]

Skip to content

Commit 908e38d

Browse files
committed
Merge pull request activeadmin#3855 from davydovanton/block
Change block.call to yield and delete excess argument in block
2 parents e5ce49a + 8512883 commit 908e38d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/active_admin/namespace.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ def reset_menu!
110110
# Add a callback to be ran when we build the menu
111111
#
112112
# @param [Symbol] name The name of the menu. Default: :default
113-
# @param [Proc] block The block to be ran when the menu is built
113+
# @yield [ActiveAdmin::Menu] The block to be ran when the menu is built
114114
#
115115
# @return [void]
116-
def build_menu(name = DEFAULT_MENU, &block)
116+
def build_menu(name = DEFAULT_MENU)
117117
@menus.before_build do |menus|
118118
menus.menu name do |menu|
119-
block.call(menu)
119+
yield menu
120120
end
121121
end
122122
end
@@ -157,7 +157,7 @@ def add_current_user_to_menu(menu, priority = 10, html_options = {})
157157
def build_menu_collection
158158
@menus = MenuCollection.new
159159

160-
@menus.on_build do |menus|
160+
@menus.on_build do
161161
build_default_utility_nav
162162

163163
resources.each do |resource|

0 commit comments

Comments
 (0)
0