May you help me understand the concept behind the hash and especially when we use symbols.
:name is a symbol right ?
we can use symbol as a key for our hashed right ?
:name
and name:
for example : those are two syntaxes but it describes a symbol right ?
when we have this for example :
Geocode.configure(
units: :km
)
here units does a reference to a specified argument called units in the configure function right ? and :km is the symbol we want to send through the variable unit or am I wrong ?
A last example :
validates :home_type, presence: true
Here we try to send to the validates function the symbol home_type right ?
and the second argument is named "presence" and we want to send the boolean true through this variable right ?
I am sorry if you don't understand my question, don't hesitate to ask me.
I got many headeck nderstanding those syntaxes.
Thanks a lot !