vendor/plugins/active_scaffold_export/lib/active_scaffold/actions/export.rb
# The actual algorithm to do the export
The actual algorithm to do the export
The actual algorithm to do the export
def find_items_for_export
      export_config = active_scaffold_config.export
      export_columns = export_config.columns.reject { |col| params[:export_columns][col.name.to_sym].nil? }
      includes_for_export_columns = export_columns.collect{ |col| col.includes }.flatten.uniq.compact
      self.active_scaffold_includes.concat includes_for_export_columns
      find_options = { :sorting => active_scaffold_config.list.user.sorting }
      params[:search] = session[:search]
      do_search rescue nil
      params[:segment_id] = session[:segment_id]
      do_segment_search rescue nil
      do_list_filter if respond_to?(:do_list_filter)
      unless params[:full_download] == 'true'
        find_options.merge!({
          :per_page => active_scaffold_config.list.user.per_page,
          :page => active_scaffold_config.list.user.page
        })
      end
      @export_config = export_config
      @export_columns = export_columns
      @records = find_page(find_options).items
    end
def find_items_for_export export_config = active_scaffold_config . export export_columns = export_config . columns . reject { | col | params [ :export_columns ] [ col . name . to_sym ] . nil? } includes_for_export_columns = export_columns . collect { | col | col . includes } . flatten . uniq . compact self . active_scaffold_includes . concat includes_for_export_columns find_options = { :sorting => active_scaffold_config . list . user . sorting } params [ :search ] = session [ :search ] do_search rescue nil params [ :segment_id ] = session [ :segment_id ] do_segment_search rescue nil do_list_filter if respond_to? ( :do_list_filter ) unless params [ :full_download ] == 'true' find_options . merge! ( { :per_page => active_scaffold_config . list . user . per_page , :page => active_scaffold_config . list . user . page } ) end @export_config = export_config @export_columns = export_columns @records = find_page ( find_options ) . items end
The actual algorithm to do the export
The actual algorithm to do the export