Symbol with underscores causes error in cache_helper.rb
When passing a symbol with underscores (e.g. :my_things) to the _cache_keys_for_all_ method in app/helpers/cache_helper.rb, such as in the following line:
localized_cache cache_keys_for_all(:my_things) do
it throws the following error:
LoadError - Unable to autoload constant My_thing
due to the code in line 9 of the file, which appears in the _cache_key_for_all_ method, called by the _cache_keys_for_all_ method:
9: klass = klass_name.to_s.singularize.capitalize.constantize
Using the example of :my_things, this line will try to set klass to "My_thing", triggering the error when it attempts to constantize.
I believe it should be:
9: klass = klass_name.to_s.singularize.camelize.constantize
which would set klass to "MyThing", which seems to be the correct form.
Nice catch, your proposed change makes sense, I'd love to see a PR with it!