make zones_map private #14252

wants to merge 1 commit into


None yet
4 participants

mcfiredrill commented Mar 3, 2014

I noticed there is no documentation for ActiveSupport::TimeZone.zones_map. I was using this method before to get an array of all the names of time zones:


Now zones_map seems to return a ThreadSafe::Cache instead of something I can map and call name on. So I switched to using .all:

It seems like maybe zones_map wasn't something intended to be used in the public interface at all, or at least not anymore. If it is, can we write some documentation for it?


chancancode commented Mar 3, 2014

cc @guilleiguaran - this was changed in #11796, can you c/d if that's private API, and whether this needs to be public (but nodoc'ed)?


arthurnn commented Feb 7, 2015

👍 this make sense to me, we actually had the same problem. we were using zones_map, and the return value changed on 4.1+ has changed. all is the public API and it should be used!


arthurnn commented Feb 7, 2015

Thanks . merged via b9ba90d on master.
and made nodoc on 4.2 a0a6e02 .

@guilleiguaran I wonder if we should also backport that to 4.1, as this should be internal anyways.

@arthurnn arthurnn added a commit that referenced this pull request Feb 7, 2015

@arthurnn arthurnn Merge pull request #14252 from mcfiredrill/make-zones-map-private
make zones_map private

arthurnn closed this Feb 7, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment