Project

General

Profile

Actions

Refactor #16221

closed

private method `zones_map' called for ActiveSupport::TimeZone:Class

Added by Dominic Cleal over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

The documentation in the users API controller lists possible values for timezones by calling ActiveSupport::TimeZone.zones_map, however this method is private in Rails 5.0:

MethodError: private method `zones_map' called for ActiveSupport::TimeZone:Class
/home/dcleal/code/foreman/foreman/app/controllers/api/v2/users_controller.rb:50:in `block (2 levels) in <class:UsersController>'

It should be replaced by a method that remains public.

Note the same list is obtained by the time_zone_select form helper, which lists timezones through .all.

Actions

Also available in: Atom PDF