Skip to content

Instantly share code, notes, and snippets.

@dustMason
Created November 1, 2011 20:47
Show Gist options
  • Save dustMason/1331851 to your computer and use it in GitHub Desktop.
Save dustMason/1331851 to your computer and use it in GitHub Desktop.
ruby-1.9.2-p180 :061 > Signup.last
Signup Load (0.4ms) SELECT "signups".* FROM "signups" ORDER BY "signups"."token" DESC LIMIT 1
#<Signup:0x0000010a51f5a8> {
:token => "ab377c84",
:email => "email1@example.com",
:referred_by => nil,
:notified => nil,
:user_id => nil,
:created_at => Tue, 01 Nov 2011 13:25:06 PDT -07:00,
:updated_at => Tue, 01 Nov 2011 13:25:06 PDT -07:00,
:google_contacts => nil,
:yahoo_contacts => nil,
:windows_live_contacts => nil,
:imported => false,
:referrals_counter => nil
}
ruby-1.9.2-p180 :062 > Signup.find_by_token 'ab377c84'
Signup Load (0.5ms) SELECT "signups".* FROM "signups" WHERE "signups"."token" = 'ab377c84' LIMIT 1
nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment