I'd take them to another version of the new page, parse the file and fill the contact_import object - prepare the page with hidden variables to be submitted to the create page.
You can simply look for this button push and render the preview page, using the generated @contact_import generated from the file
def create
@contact_import = ContactImport.new(params[:contact_import])
if params[:preview]
render :preview
elsif @contact_import.save
redirect_to root_url, notice: "Imported contacts successfully."
else
render :new
end
end
preview.html.erb is similar to new.html.erb, but with hidden inputs and back button. Posting from preview will also go to create, but should not cause any error conditions.
I don't believe you'll need a new route - just render :preview instead of :new in this case.