Ruby on Rails Thursday, November 29, 2012

On Tuesday, May 10, 2011 12:43:16 PM UTC-5, David Kahn wrote:

On Tue, May 10, 2011 at 12:37 PM, David Kahn <d...@structuralartistry.com> wrote:
Ok, so it looks like I need ActiveSupport::CoreExtensions::Hash. A bit confused as at the top of application.rb there is * require 'rails/all' *, so I would think this should be included but is not. ActiveSupport is loaded but not CoreExtensions. 

Looks like I have answered my own question: if I do my assignments in "config.after_initialize" then I have the CoreExtensions and deep_symbolize_keys.

Your workaround didn't work for me, as I want to use my config hash in application.rb directly.

A quick recursive grep through all of my gems located the offender: i18n, of all things. While ActiveSupport has Hash.deep_symbolize_keys defined on the master branch on Github, that hasn't made into the latest release (3.2.9). So for now, require 'i18n/core_ext/hash' will do the job nicely.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/PuF_tjNyCMEJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment