Sequel shorts: Give me a hash!

Want to just get an array of hashes from a query instead of full-blown model objects? Easy.


Artist.select(:id, :name).naked.all
# => [{:id=>1, :name=>"mrbrdo"}]

view raw

sequel_naked.rb

hosted with ❤ by GitHub

Leave a comment