Created
November 10, 2011 15:51
-
-
Save daveworth/1355188 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Foo < ActiveRecord::Base | |
| #... | |
| end | |
| class Bar < Foo | |
| serialize :foo | |
| end | |
| def edit | |
| foo = Foo.find(1) # => Bar(id: 1) | |
| foo.foo = ["neat"] | |
| foo.save! # does not update the Bar table in the DB | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment