Curated list of episodes, bundled to help you on your learning path!
Videos of tech, infrastructure, hardware and software which non-instructional by nature.
Articles around software and tutorials.
Show your love and support while looking fancy.
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.
The * is a splat operator. So, take the following example.
 pry(main)> fields=> ["first_name", "last_name"] pry(main)> User.first.attributes.values_at(fields)User Load (0.5ms)SELECT`users`.* FROM `users` ORDER BY `users`.`id` ASC LIMIT 1=> [nil] 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"]
The ! at the end of find_or_create_by will raise an exception on validation errors.
How do I export nested attributes to CSV? i.e. I have a primary contact model, and I nested secondary contact into it. How do I export both as single CSV file?