vendor/plugins/active_scaffold_export/lib/active_scaffold/actions/export.rb
# if invoked directly, will use default configuration
if invoked directly, will use default configuration
if invoked directly will use default configuration
def export
      export_config = active_scaffold_config.export
      if params[:export_columns].nil?
        export_columns = {}
        export_config.columns.each { |col|
          export_columns[col.name.to_sym] = 1
        }
        options = {
          :export_columns => export_columns,
          :full_download => export_config.default_full_download.to_s,
          :delimiter => export_config.default_delimiter,
          :skip_header => export_config.default_skip_header.to_s
        }
        params.merge!(options)
      end
      find_items_for_export
      response.headers['Content-Disposition'] = "attachment; filename=#{export_file_name}"
      render :partial => 'export', :layout => false, :content_type => Mime::CSV, :status => response_status
    end
def export export_config = active_scaffold_config . export if params [ :export_columns ] . nil? export_columns = { } export_config . columns . each { | col | export_columns [ col . name . to_sym ] = 1 } options = { :export_columns => export_columns , :full_download => export_config . default_full_download . to_s , :delimiter => export_config . default_delimiter , :skip_header => export_config . default_skip_header . to_s } params . merge! ( options ) end find_items_for_export response . headers [ 'Content-Disposition' ] = "attachment; filename=#{export_file_name}" render :partial => 'export' , :layout => false , :content_type => Mime :: CSV , :status => response_status end
if invoked directly, will use default configuration
if invoked directly will use default configuration