We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If csv file consists empty columns like this
,col_1,col_2,col_3,col_4,col_5,col_6 ,1,112,1,100,130,4,8
it rases error Error: undefined method 'underscore' for nil:NilClass Possible solution is to change prepare_headers method in Importer class like this
Error: undefined method 'underscore' for nil:NilClass
def prepare_headers headers = self.headers.present? ? self.headers : yield headers = headers.map(&:to_s) @headers = headers.zip(headers.map { |el| el.underscore.gsub(/\s+/, '_') }).to_h.with_indifferent_access @headers.merge!(options[:headers_rewrites].symbolize_keys.slice(*@headers.symbolize_keys.keys)) end
The text was updated successfully, but these errors were encountered:
No branches or pull requests
If csv file consists empty columns like this
it rases error
Error: undefined method 'underscore' for nil:NilClass
Possible solution is to change prepare_headers method in Importer class like this
The text was updated successfully, but these errors were encountered: