Guest User

Untitled

a guest
Feb 19th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. class Foo < ActiveRecord::Base
  2. serialize :name
  3. end
  4.  
  5. >> Foo.create!(:name => "bar")
  6. => #<Foo id: 1, name: "bar">
  7.  
  8. >>Foo.find_by_name("bar")
  9. => nil
  10.  
  11. >> Foo.all
  12. [#<Foo id: 1, name: "bar">]
Add Comment
Please, Sign In to add comment