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
194 195 196 197 198 199 |
# File 'lib/engine2/meta.rb', line 194 def , &blk ||= {} [] ||= ActionMenuBuilder.new(:root) [].instance_eval(&blk) if blk [] end |
#post_process ⇒ Object
201 202 203 204 205 206 207 208 209 |
# File 'lib/engine2/meta.rb', line 201 def post_process super if && !.empty? [:menus] = {} .each_pair do |name, | [:menus][name] = {entries: .to_a, properties: .properties} end end end |