Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法使您在 Ruby On Rails 中处理的所有哈希都成为 HashWithIndiffergentAccess?有很多次我尝试使用符号而不是字符串来访问哈希,例如 Model.attributes。
谢谢!
::Hash = HashWithIndifferentAccess
不过,这是个非常糟糕的主意。