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
434 435 436 437 |
# File 'lib/engine2/action.rb', line 434 def field_tabs hash [:tab_list] = hash.keys [:tabs] = hash.reduce({}){|h, (k, v)| h[k] = {name: k, loc: LOCS[k], field_list: v}; h} end |
#select_tabs(tabs, *args, &blk) ⇒ Object
429 430 431 432 |
# File 'lib/engine2/action.rb', line 429 def select_tabs tabs, *args, &blk field_tabs tabs select *tabs.map{|name, fields|fields}.flatten, *args, &blk end |
#tab(*tabs, options) ⇒ Object
439 440 441 442 443 444 |
# File 'lib/engine2/action.rb', line 439 def tab *tabs, raise E2Error.new("No tabs given to info") if tabs.empty? tabs.each do |tab| [:tabs][tab].merge! # rmerge ? end end |