2019-09-01から1ヶ月間の記事一覧
ActiveRecord valid? should includes ActiveModel validation for integer type column · Issue #37256 · rails/rails · GitHub validationを設定していないモデルのテーブルにint(11)型で定義したカラムにint(11)を超える値を設定すると、バリデーションエ…
Migration running twice #37225 Migration running twice · Issue #37225 · rails/rails · GitHub 質問1 railsコマンドを実行すると2回実行してしまう。一体何が起きているんですか? (本文に再現コードあり) 回答1 This file does not have the migration …
github.com render :text が削除されたことがアップグレード移行ガイドにに書かれていない、という指摘のissueだ。 本文 render :text was removed in 5.1 but it is not mentioned in the upgrading guide for 5.1. render :textが5.1から削除されたが、ア…
github.com 本文 rails4.2.xでは、 lib/active_record/core.rb#initialize_dup が正しく複製してくれるけれども、rails5.2ではpullするだけ MyModel._default_attributes によって、すでに複製したものを削除する。 Yes this still occurs on 5-2-stable. I'…
github.com String inflection method underscore giving wrong output #37163 質問 アンダースコアライズする文字列変換文字列のアウトプットがおかしいんだが? Open up rails console and type - "ActLikeStar".underscore gives you 'act_like_star' whi…