Skip to content
New issue

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

allow copy_from with no headers #27

Closed
edatrix opened this issue Mar 23, 2015 · 1 comment
Closed

allow copy_from with no headers #27

edatrix opened this issue Mar 23, 2015 · 1 comment

Comments

@edatrix
Copy link

edatrix commented Mar 23, 2015

I didn't mess around with this, so maybe you can map this in some way, but it would be nice if you can import with no headers.

@jackturnbull
Copy link

You can pass options to copy_from. A header of false will skip headers.

For example:

  Customer.copy_from 'file.csv', header: false, columns: [
    :name,
    :age,
    :date_of_birth
  ]

@diogob diogob closed this as completed Feb 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants