Fix Rails 6 deprecation warnings
What does this MR do?
Hey @engwan, I've created this merge request addressing some deprecation warnings. This is a separate merge request to not interfere with your current work but feel free to merge this into the 31034-upgrade-to-rails-6
branch.
DEPRECATION WARNING: `ActiveRecord::Result#to_hash` has been renamed to `to_a`. `to_hash` is deprecated and will be removed in Rails 6.1.