rails_admin_import 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -58,7 +58,9 @@ module RailsAdminImport
58
58
  return results = { :success => [], :error => ["You must select a file."] }
59
59
  end
60
60
 
61
- file = CSV.new(params[:file].tempfile)
61
+ text = File.read(params[:file].tempfile)
62
+ clean = text.gsub(/\n$/, '')
63
+ file = CSV.new(clean)
62
64
 
63
65
  if RailsAdminImport.config.logging
64
66
  FileUtils.copy(params[:file].tempfile, "#{Rails.root}/log/import/#{Time.now.strftime("%Y-%m-%d-%H-%M-%S")}-import.csv")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin_import
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: