Method: Import#analyze_csv
- Defined in:
- app/models/import.rb
#analyze_csv ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'app/models/import.rb', line 23 def analyze_csv result = [] data = CSV.read(self.upload.image.path, {:col_sep => self.separator}) data.first.each_with_index do |a, index| result << [a,index.to_s] end @analyze_csv ||= result end |