I am working on a engine, where i am parsing a excel file using Roo gem. The problem i am facing is that i don't know how to map columns.
For e.g. my db-table have columns first_name, last_name, emp_id, designation etc. But my excel file can have any column name for e.g. it could be fname, lname, e_id, designation or it could be FirstName, LastName, EmployeeId etc.
Now how do i map data such that it will get stored in the respective column.
I have checked this question but how do i set alias as my excel column header can be anything. If can alias than please tell me how i can do that. Its my first time i am working on rails engine. Also i am new to ruby. Any help would be appreciated.