Closed hstoebel closed 7 years ago
I think that should do it. I'm not sure what's going on.
I'd start by checking if the lambda is being called. I would use https://github.com/deivid-rodriguez/pry-byebug
config.header_converter = lambda do |header|
binding.pry
header
end
sorry I forgot to close this. Turns out there was something very strange going on in our model that was causing records to be rejected. Nothing wrong with this code.
The attributes in the model I am trying to upload to are not lower case underscored. Some examples are.
SiteName
City
Phone
I tried to configure it so the header name isn't transformed at all (the user must provide the exact attribute name):
When I try to import I'm told I didn't provide a
SiteName
,City
etc. Am I doing this wrong? And of course there is always a possibility the problem lies somewhere else