Module: Engine2::ActionTabSupport
- Included in:
- ActionFormSupport, ActionListSupport, ActionViewSupport
- Defined in:
- lib/engine2/action.rb
Instance Method Summary collapse
Instance Method Details
#field_tabs(hash) ⇒ Object
448 449 450 451 |
# File 'lib/engine2/action.rb', line 448 def field_tabs hash @meta[:tab_list] = hash.keys @meta[:tabs] = hash.reduce({}){|h, (k, v)| h[k] = {name: k, loc: LOCS[k], field_list: v}; h} end |
#select_tabs(tabs, *args, &blk) ⇒ Object
443 444 445 446 |
# File 'lib/engine2/action.rb', line 443 def select_tabs tabs, *args, &blk field_tabs tabs select *tabs.map{|name, fields|fields}.flatten, *args, &blk end |