2019年11月現在のRailsのissueに関するメモ #heiseirb

平成.rb #10Railsのissueに取り組むきっかけが分からない人向けのメモです。

個人的に気になっているissueについて簡単にまとめました。

注意)特に初心者向けとかではありません。

STIhas_secure_password の組合せで、親クラスでvalidationsを切り替えたい?

Trouble using has_secure_password validations attribute with STI models https://github.com/rails/rails/issues/37755

  • 再現コードなし
  • 登録者のコードは意図通りじゃなさそう
    • self.classClass を返すから常に true

scope + new でエラーが出る

raise_on_type_mismatch! in ActiveRecord::Associations::BelongsToAssociation https://github.com/rails/rails/issues/37752

  • 再現コードなし
  • コミッターの反応あり

ignored_columns + from で意図しないカラムが無視される

Ignored columns is ignoring virtual columns selected by .from https://github.com/rails/rails/issues/37745

  • 再現コードなし

through と polymorphic の組合せで外部キーがnilになる

Assigning with a through association and a self-ref polymorphic association leaves a nil foreign key https://github.com/rails/rails/issues/37758

  • 再現コードなし

request.variant の挙動が5.2と6.0で違う

Rails 6.0.0 chooses variants differently from 5.2 when variants are using different template engines https://github.com/rails/rails/issues/37021

  • 再現コードなし
  • リグレッション
    • 5.2 の挙動がバグっていた可能性もある
  • stale ラベル

enum で文字列を代入したらエラーになる

Revisiting the inconsistency in enums: raises ArgumentError when making an assignment with invalid value, but returns wrong results when querying https://github.com/rails/rails/issues/37630

  • 再現コードなし

accepts_nested_attributes_for でモデルを削除してもメモリ上に残る

Removing association with dependent: :destroy, through nested attributes leaves entity from intermediate table in memory https://github.com/rails/rails/issues/37649

  • 再現コードあり

DateTime#advance の挙動が5.2と6.0で違う?

DateTime#advance() expats integer params https://github.com/rails/rails/issues/37425

  • 再現コードなし

joins と pluck をあわせて使うと型が変わる

Unexpected Type Casting in ActiveRecord::Calculations#pluck https://github.com/rails/rails/issues/28044

  • 再現コードあり
  • 直すのは難しそう

テーブルない状態で order を呼ぶと5.2からエラー?

Calling "order" crashes when the model isn't represented by a database table https://github.com/rails/rails/issues/37741

  • 再現コードあり
  • 仕様かバグかの判断から必要そう

belongs_to と scope の組合せでsaveに失敗する

belongs_to with scope cause racord save fails https://github.com/rails/rails/issues/36990

  • 再現コードなし
  • stale ラベル