Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8253289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:49:51+00:00 2026-06-08T00:49:51+00:00

I have quite specific issue. I have application where I need to import data

  • 0

I have quite specific issue. I have application where I need to import data in CSV file, which is after upload processed and then the overview page with results is shown to user.

I have already methods how to parse a CSV file. It works OK. But its just 1 step form:

  1. New – method and erb file with form

  2. Method after post which processes the CSV file => and the data are in DB.

It’s working fine, but I want also automatically generate a CSV file with rows which failed on first upload. I have written method for that, according to this link. But unfortunately the user experience from this approach is terrible. Because, if you generate new CSV file with errors, it just sends a download popup invoked by method:

send_data errCSV, :type => 'text/csv; charset=iso-8859-1; header=present', :disposition => "attachment; filename=#{errFile}.csv"

After the 2nd POST method I want to add a redirect to another view, of which will contain something like “Import overview” header and number of errors, number of correct lines and also a link on method to invoke this temporary downloadable file.

Then my problem is, how can I effectively and without saving a CSV go through 3 step wizard?

EDIT

def upload_csv
 #method which render form
end

def import_csv
 #method implemented logic for parsing CSV
 #POST METHOD
 redirect_to overview_method_view
end

def overview
 #method which could create a overview
end

And I need pass values(suppose an array) between import_csv and overview. I don’t want to save any file. Just considering using Session.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T00:49:53+00:00Added an answer on June 8, 2026 at 12:49 am

    could you specify which is your 2nd POST method? I think that I don’t fully understand the problem.

    By the way, if you want to mantain info between request but you don’t want to use the csv generated, you’ll have to use the DB, session or flash

    Edit:

    You could use session in this case, you’ll only have to do:

    def import_csv
      #Business logic
      session[:csv_info] = ... #What you want to be persisted between request
      redirect_to overview_method_view
    end 
    
    def overview
      @whatever = session[:csv_info]
    end
    

    Hope it helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a quite specific client-server design case and I want to ask for
I have a quite specific problem. I created a webapp and want to have
Im doing something quite specific where I have a text input, I want to
This is quite a specific question, and I have had no luck on the
I have quite a few buttons in my application, they vary in sizes based
I have 6000 data of district, subdistrict. I need to represent this on dependent
I have an application which communicates with a database. Each table has a unique
Do anybody have any experience with retrieving live stock data for a specific stock
I have an interesting issue where I need to round the result of an
I'm trying to adress the following issue: I have a server side .net application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.