app/controllers/report_controller/widgets.rb
# Build the fields array and headers hash from the rpt record cols and includes hashes
Build the fields array and headers hash from the rpt record cols and includes hashes
Build the fields array and headers hash from the rpt record cols and includes hashes
def widget_build_selected_fields(rpt)
    fields = []
    rpt.col_order.each_with_index do |col, idx|
      field_key = col
      field_value = rpt.headers[idx]
      fields.push([field_value, field_key])               
    end
    @edit[:new][:fields] = fields
  end
def widget_build_selected_fields ( rpt ) fields = [ ] rpt . col_order . each_with_index do | col , idx | field_key = col field_value = rpt . headers [ idx ] fields . push ( [ field_value , field_key ] ) end @edit [ :new ] [ :fields ] = fields end
Build the fields array and headers hash from the rpt record cols and includes hashes
Build the fields array and headers hash from the rpt record cols and includes hashes
# Add to fields array
rpt
<not_specific>