d08aa11bfb
* Add JSON API support for timezone update * Simplify timezone controller to just head :no_content * Use PUT instead of PATCH in timezone tests to match docs * Use PATCH instead of PUT for timezone endpoint Reverts tests to use patch and updates docs heading to PATCH for consistency.
12 lines
234 B
Ruby
12 lines
234 B
Ruby
class My::TimezonesController < ApplicationController
|
|
def update
|
|
Current.user.settings.update!(timezone_name: timezone_param)
|
|
head :no_content
|
|
end
|
|
|
|
private
|
|
def timezone_param
|
|
params[:timezone_name]
|
|
end
|
|
end
|