```ruby
class ApplicationController < ActionController::Base
  # Prevent CSRF attacks by raising an exception.
  # For APIs, you may want to use :null_session instead.
  protect_from_forgery with: :exception

  before_action :set_time_zone, :set_mailer_host

  def set_time_zone
    Time.zone = 'Tokyo'
  end

  def set_mailer_host
    ActionMailer::Base.default_url_options = {:host => request.host_with_port}
  end

end
```

Remove set_time_zone method from before_action
user
```ruby
class ApplicationController < ActionController::Base
  # Prevent CSRF attacks by raising an exception.
  # For APIs, you may want to use :null_session instead.
  protect_from_forgery with: :exception

  before_action :set_mailer_host

  def set_mailer_host
    ActionMailer::Base.default_url_options = {:host => request.host_with_port}
  end

end
```
assistant