たまにActiveRecord関係なくSQLを実行したいことがあるので。
hash = ActiveRecord::Base.connection.select_all("select * from xxx").to_hash
More than 5 years have passed since last update.
たまにActiveRecord関係なくSQLを実行したいことがあるので。
hash = ActiveRecord::Base.connection.select_all("select * from xxx").to_hash
Register as a new user and use Qiita more conveniently