Ruby on Rails Developer Question:

Tell me the difference between ActiveSupport’s “HashWithIndifferentAccess” and Ruby’s “Hash”?

Tweet Share WhatsApp

Answer:

The “HashWithIndifferentAccess” class will treat symbol keys and string keys as equivalent while the “Hash” class in Ruby will use the stricter = = comparison on keys—an equivalent string key will not retrieve the value for a given symbol key.

Download Ruby on Rails Developer PDF Read All 30 Ruby on Rails Developer Questions
Previous QuestionNext Question
Tell me how does Ruby on Rails use the Model View Controller (MVC) framework?Tell me what is CoC in Rails?