Guest User

Untitled

a guest
Feb 20th, 2018
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.94 KB | None | 0 0
  1. >> u = CouchUser.all
  2. => [#<CouchUser:0x1f3e958 @_id="1011ea17e91e49e9cf9180201a72f2f1", @bulk_save_queue=#<CouchPotato::Persistence::BulkSaveQueue:0x1f3e91c @other_queues=[], @instances=[], @callbacks=[]>, last_name"Malko", login"ting", updated_atTue Nov 11 00:59:37 -0500 2008, rev"1825706269", addresses#<CouchPotato::Persistence::ExternalCollection:0x1f1feb8 @items=[], @owner_id_attribute_name=:couch_user_id, @item_class=Address>, first_name"Robert", email"robmalko@gmail.com", created_atTue Nov 11 00:59:37 -0500 2008, #<CouchUser:0x1f0f2c0 @_id="292644e96ce2480a93e0a6a5d268cfc2", @bulk_save_queue=#<CouchPotato::Persistence::BulkSaveQueue:0x1f0f284 @other_queues=[], @instances=[], @callbacks=[]>, last_name"Malko", login"zing", updated_atTue Nov 11 00:59:16 -0500 2008, rev"2459150784", addresses#<CouchPotato::Persistence::ExternalCollection:0x1f06d8c @items=[], @owner_id_attribute_name=:couch_user_id, @item_class=Address>, first_name"Robert", email"robmalko@gmail.com", created_atTue Nov 11 00:59:16 -0500 2008, #<CouchUser:0x1a75f20 @_id="cd9aeb26ef90840bb5b1c93ab1293e50", @bulk_save_queue=#<CouchPotato::Persistence::BulkSaveQueue:0x1a75d04 @other_queues=[], @instances=[], @callbacks=[]>, last_name"Malko", login"ding", updated_atTue Nov 11 00:59:29 -0500 2008, rev"1579143706", addresses#<CouchPotato::Persistence::ExternalCollection:0x1a6d4d8 @items=[], @owner_id_attribute_name=:couch_user_id, @item_class=Address>, first_name"Robert", email"robmalko@gmail.com", created_atTue Nov 11 00:59:29 -0500 2008]
  3. >> j = u.to_json
  4. => "[{"created_at":"Tue Nov 11 00:59:37 -0500 2008","email":"robmalko@gmail.com","_id":"1011ea17e91e49e9cf9180201a72f2f1","_rev":"1825706269","updated_at":"Tue Nov 11 00:59:37 -0500 2008","login":"ting","ruby_class":"CouchUser","first_name":"Robert","last_name":"Malko"},{"created_at":"Tue Nov 11 00:59:16 -0500 2008","email":"robmalko@gmail.com","_id":"292644e96ce2480a93e0a6a5d268cfc2","_rev":"2459150784","updated_at":"Tue Nov 11 00:59:16 -0500 2008","login":"zing","ruby_class":"CouchUser","first_name":"Robert","last_name":"Malko"},{"created_at":"Tue Nov 11 00:59:29 -0500 2008","email":"robmalko@gmail.com","_id":"cd9aeb26ef90840bb5b1c93ab1293e50","_rev":"1579143706","updated_at":"Tue Nov 11 00:59:29 -0500 2008","login":"ding","ruby_class":"CouchUser","first_name":"Robert","last_name":"Malko"}]"
  5. >>
  6.  
  7. >> a = Address.all
  8. => [#<Address:0x2540928 @_id="059865fb6228fb5711658be0e58a2758", @bulk_save_queue=#<CouchPotato::Persistence::BulkSaveQueue:0x25408ec @other_queues=[], @instances=[], @callbacks=[]>, couch_user_id"3c912c0c2be8b2da36a24658a9cf8f6f", updated_atTue Nov 11 20:19:52 -0500 2008, rev"3226059960", street"happy street", created_atTue Nov 11 20:19:52 -0500 2008]
  9. >> a.to_json
  10. => "[{"created_at":"Tue Nov 11 20:19:52 -0500 2008","_id":"059865fb6228fb5711658be0e58a2758","_rev":"3226059960","street":"happy street","updated_at":"Tue Nov 11 20:19:52 -0500 2008","ruby_class":"Address","couch_user_id":"3c912c0c2be8b2da36a24658a9cf8f6f"}]"
  11. >>
Add Comment
Please, Sign In to add comment