module Engine2::ActionTabSupport

Public Instance Methods

field_tabs(hash) click to toggle source
# 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) click to toggle source
# 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
tab(*tabs, options) click to toggle source
# File lib/engine2/action.rb, line 453
def tab *tabs, options
    raise E2Error.new("No tabs given to info") if tabs.empty?
    tabs.each do |tab|
        @meta[:tabs][tab].merge! options # rmerge ?
    end
end