Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introducing the Rails Attribute API

Avatar for alassek alassek
August 10, 2017

Introducing the Rails Attribute API

Officially public starting in 5.0, the Rails attribute API gives you an easy way to extend ActiveRecord behavior.

Avatar for alassek

alassek

August 10, 2017

More Decks by alassek

Other Decks in Programming

Transcript

  1. Adam Lassek @alassek CREATE TYPE address AS ( street text,

    city text, state varchar(2), zipcode varchar(9) )
  2. Adam Lassek @alassek From Database '("1209 Harney St.",Omaha,NE,68102)' From Controller

    { "company": { "hq": { "street": "1209 Harney St.", "city": "Omaha", "state": "NE", "zipcode": "68102" } } }