Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org_a = Organisation.first(:id => 1)
- org_b = Organisation.first(:id => 1)
- org_c = org_b
- puts org_a.to_s
- puts org_b.to_s
- puts org_c.to_s
- puts "ID's a=#{org_a.object_id}, b=#{org_b.object_id}, c=#{org_c.object_id}"
- puts "org_a == org_b is #{org_a == org_b}"
- # Output from above
- #<MAPI::Model::Organisation:0xb7bae19c>
- #<MAPI::Model::Organisation:0xb7b965d8>
- #<MAPI::Model::Organisation:0xb7b965d8>
- ID's a=-606244658, b=-606293268, c=-606293268
- org_a == org_b is false
Add Comment
Please, Sign In to add comment