Skip to content

Instantly share code, notes, and snippets.

@daveworth
Created November 10, 2011 15:51
Show Gist options
  • Select an option

  • Save daveworth/1355188 to your computer and use it in GitHub Desktop.

Select an option

Save daveworth/1355188 to your computer and use it in GitHub Desktop.
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