Wicked Good Ruby 2013 - Supercharging ActiveRecord with PostreSQL
2,360 views · Published 31 October 2013 · 22:57 · Indexed 12 November 2026
Channel: Confreaks · 2013 · Science & Technology
By Dan McClain You've been able to serialize Ruby objects with ActiveRecord in the past, but the database treats serialized objects as text. PostgreSQL has support for advanced data types, like arrays, hashes and ranges, natively, allowing the database to do the heavy work for you. You can query a table for records that contain an array with a specific element. You can build a reservation system in which the database makes sure that you don't double book a room. All of which happens in the database, preventing you from retrieving extra records and processing them in memory. With Rails 4, ActiveRecord has been supercharged. The PostgreSQL adapter has been extended to support arrays and hashes, and was rewritten to make adding your own types easier than before. There are gems out there that allow you to leverage these datatypes in Rails 3 as well. Help us caption & translate this video! http://amara.org/v/FG6d/
More from this channel
-
35:52
Code Design and the Science of Pleasure
-
5:40
Services Inception with Ruby by Dave McCrory
-
48:58
Ruby Software Continuously Delivered and Exhaustively Explained by Brian Guthrie, Srushti Ambekallu
-
40:58
Jruby Polyglot Heaven by Thomas E Enebo and Charles Oliver Nutter
-
42:17
Be a Minecraft modman with Purugin by Thomas E. Enebo
-
36:46
Your tests are lying to you by Chris Parsons
-
23:46
KidsRuby: Think Of The Children! by Ron Evans
-
52:05
Resources, For Real This Time (with Webmachine) by Sean Cribbs