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
286 287 288 289 290 291 |
# File 'lib/engine2/action.rb', line 286 def , &blk ||= {} [] ||= ActionMenuBuilder.new(:root) [].instance_eval(&blk) if blk [] end |
#menu?(menu_name) ⇒ Boolean
293 294 295 |
# File 'lib/engine2/action.rb', line 293 def && [] end |
#post_process ⇒ Object
297 298 299 300 301 302 303 304 305 |
# File 'lib/engine2/action.rb', line 297 def post_process super if && !.empty? [:menus] = {} .each_pair do |name, | [:menus][name] = {entries: .to_a, properties: .properties} end end end |