Skip to content

Instantly share code, notes, and snippets.

@teamon
Created October 27, 2008 22:32
Show Gist options
  • Save teamon/20223 to your computer and use it in GitHub Desktop.
Save teamon/20223 to your computer and use it in GitHub Desktop.
>> Company.authenticate("luke", "force")
~ SELECT "crypted_password", "salt", "id", "login", "email", "name", "first_name", "last_name", "street", "postcode", "city", "phone", "www", "rank", "trade_id", "type", "created_at", "updated_at", "activated_at", "activation_code" FROM "users" WHERE ("type" IN ('Company')) AND ("login" = 'luke') ORDER BY "id" LIMIT 1
=> nil
>> Person.authenticate("luke", "force")
~ SELECT "crypted_password", "salt", "id", "login", "email", "name", "first_name", "last_name", "street", "postcode", "city", "phone", "www", "rank", "trade_id", "type", "created_at", "updated_at", "activated_at", "activation_code" FROM "users" WHERE ("type" IN ('Person')) AND ("login" = 'luke') ORDER BY "id" LIMIT 1
=> #<Person crypted_password="7ca275efcc90584839d5ae66ac5aae3475c5572d" salt="e39c0adcfae0c5767b849c7f4381de5387757565" id=4 login="luke" email="[email protected]" name="Luke Skywalker" first_name="Luke" last_name="Skywalker" street=nil postcode=nil city=nil phone=nil www=nil rank=nil trade_id=nil type=Person created_at=#<DateTime: 17674325143/7200,1/24,2299161> updated_at=#<DateTime: 17674325143/7200,1/24,2299161> activated_at=#<DateTime: 17674325143/7200,1/24,2299161> activation_code=nil>
>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment