Module: Engine2::MetaMenuSupport
- Included in:
- ConfirmMeta, FormMeta, LogoutFormMeta, MenuMeta, MetaListSupport, MetaViewSupport
- Defined in:
- lib/engine2/meta.rb
Instance Method Summary collapse
Instance Method Details
#menu(menu_name, &blk) ⇒ Object
198 199 200 201 202 203 |
# File 'lib/engine2/meta.rb', line 198 def , &blk @menus ||= {} @menus[] ||= ActionMenuBuilder.new(:root) @menus[].instance_eval(&blk) if blk @menus[] end |
#post_process ⇒ Object
205 206 207 208 209 210 211 212 213 |
# File 'lib/engine2/meta.rb', line 205 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 |