David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
David Kimura PRO said almost 10 years ago on Importing and Exporting CSV Data :

Have a look at this branch compare. (https://github.com/driftingrub...

You basically will need to temporarily create a file to store it and pass the path to ActiveJob. While this is currently working on local filestore, it can also work with S3 or fog.


David Kimura PRO said almost 10 years ago on Importing and Exporting CSV Data :

The * is a splat operator. So, take the following example.

[2] pry(main)> fields
=> ["first_name", "last_name"]
[3] pry(main)> User.first.attributes.values_at(fields)
User Load (0.5ms)SELECT`users`.* FROM `users` ORDER BY `users`.`id` ASC LIMIT 1
=> [nil]
[4] pry(main)> User.first.attributes.values_at(*fields)
User Load (0.5ms)SELECT`users`.* FROM `users` ORDER BY `users`.`id` ASC LIMIT 1
=> ["System", "Administrator"]

http://blog.honeybadger.io/rub...

The ! at the end of find_or_create_by will raise an exception on validation errors.


David Kimura PRO said almost 10 years ago on ActionCable - Part 1 - Configuration and Basics :

Keep in mind that if you are using ActionCable on production, it does not currently work with Apache + Passenger. Instead use Nginx + Passenger.

https://www.phusionpassenger.com/library/config/apache/action_cable_integration/


David Kimura PRO said almost 10 years ago on Client Side Validations :

Glad to hear!


David Kimura PRO said almost 10 years ago on WYSIWYG Editor with Summernote :

Thank you for watching