class ApplicationController < ActionController::Base around_action :set_time_zone protected def set_time_zone if user_signed_in? && !current_user.time_zone.nil? && !current_user.time_zone.blank? gon.user_time_zone = ActiveSupport::TimeZone.zones_map[current_user.time_zone] Time.use_zone(current_user.time_zone) { yield } else yield end end
yield のところで Argument out of range がでるんですけど
yield を引数なしで使っているブログはたくさんでてくるので何が悪いのでしょうか
しかも昨日までは普通に動いていたんですが
他の開発メンバーがぜんぜん関係ないところで変更を行った際急にエラーが出るようになったみたいです
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。