cat = Hash.new
users = where("last_seen is not null")
users.each do |u|
profession = GeneralInformation.where("information_id = ? and information_type = 'User'", u.id).select(:profession)
if cat.key?(profession) then cat[profession] = cat[profession] + 1 else cat[profession] = 1 end
私はこのコードをデバッグし、パーサーが次の行に移動しようとすると
users.each do |u|
私はimplicit_render.rbファイルにリダイレクトされました.レールコンソールでこれらすべてのコード行を段階的に実行しましたが、そこで正しく動作します.whats問題. .each メソッドの動作がおかしいのはなぜですか?