only one copy of symbol  

irb(main):001:0> "string".object_id == "string".object_id
=> false
irb(main):002:0> :string.object_id == :string.object_id
=> true

The .object_id method gets the ID of an object—it’s how Ruby knows whether two objects are the exact same object.

irb(main):002:0> string = "string"
=> "string"
irb(main):003:0> string.object_id == "string".object_id
=> false
irb(main):004:0> string = :string
=> :string
irb(main):005:0> string.object_id == :string.object_id
=> true
 
0
Kudos
 
0
Kudos

Now read this

Rails prototype Post-It: Lesson 1

This is what I have done on week 1, course 2 of Tealeaf Academy: Database tables - schema view # posts: ‘url’, ‘title’, ‘description’ users: ‘username’ comments: ‘body’ categories: ‘name’ foreign keys (and primary keys) Migration files #... Continue →