Describe a "symbol" in Rails?

Question:Describe a "symbol" in Rails?

1.Ruby complains if we try to evaluate an undefined local variable, but issues no such complaint for an instance variable; instead, instance variables are nil if not defined

2.Symbols look kind of like strings, but prefixed with a colon instead of surrounded by quotes. For example, :name is a symbol. You can think of symbols as basically strings without all the extra baggag

3.An array uses indices and a hash uses "keys"

4.This is not a standard rails directory, but a directory installed by RSpec in which all test files are kept.


Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!