Module: Engine2::ActionMenuSupport
- Included in:
- ActionFormSupport, ActionListSupport, ActionViewSupport, ConfirmAction, InfraAction, InspectModalAction, LogoutFormAction, MenuAction
- Defined in:
- lib/engine2/action.rb
Instance Method Summary collapse
Instance Method Details
#menu(menu_name, &blk) ⇒ Object
287 288 289 290 291 292 |
# File 'lib/engine2/action.rb', line 287 def , &blk @menus ||= {} @menus[] ||= ActionMenuBuilder.new(:root) @menus[].instance_eval(&blk) if blk @menus[] end |
#menu?(menu_name) ⇒ Boolean
294 295 296 |
# File 'lib/engine2/action.rb', line 294 def @menus && @menus[] end |
#post_process ⇒ Object
298 299 300 301 302 303 304 305 306 |
# File 'lib/engine2/action.rb', line 298 def post_process super if @menus && !@menus.empty? @meta[:menus] = {} @menus.each_pair do |name, | @meta[:menus][name] = {entries: .to_a, properties: .properties} end end end |