• A Symbol looks like a variable name but it's prefixed with a colon.

     Examples - :action
  • Alternatively, you can consider the colon to mean "thing named" so :id is "the thing named id." You can also think of :id as meaning the name of the variable id, and plain id as meaning the value of the variable.

A Symbol is the most basic Ruby object you can create. It's just a name. Symbols are useful because a given symbol name refers to the same object throughout a Ruby program. Symbols are...

Read complete blog post

Hello, ruby beginners. Hope you have read ruby basics. let's revise few things.





"Kiprosh"+123 #<TypeError: can't convert Fixnum into String as 123 is Fixnum and "Kiprosh" is a string. "Kiprosh"+123.to_s = Kiprosh123



consider the following hash: h={"abcd"="pqrs","abc"="xyz" }

How to access.?

h["abcd"] will return "pqrs"

similarly h["abc"] will return xyz

we can store keys in variables and can access the values like following

x="abcd" then...

Read complete blog post