なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2018/01/07)

2018/01/07分のコミットです。

CHANGELOGへの追加はありませんでした。


Revert commit 4ec5b0d6b4d8a57e034b1014942356e95caf47aa in favor of #28379

activerecord/lib/active_record/connection_adapters/abstract_adapter.rbの修正です。

SQLite3 adapterでintegerのデフォルトが4 bytesとして扱われていたのを8 bytesとして扱うよう修正した、SQLite3 valid integer value should be 8 bytes (64-bit signed integer)により不要になったsql_typeがbigintの場合の特別な処理を削除しています。


Fix pluck with eager loading to respect offset

activerecord/lib/active_record/relation/finder_methods.rbの修正です。

pluck + eager load + offsetを使用した場合に、offsetに指定した値が使用されないバグがあったのを修正しています。


Fix last with offset to behave consistently with loaded relation

activerecord/lib/active_record/relation/finder_methods.rbの修正です。

load済みのrelationに対して、last + offsetを使用した場合、offsetに指定した値が正しく取得出来ないバグがあったのを修正しています。


Make find_nth_from_last more performant when using reversible order

activerecord/lib/active_record/relation/finder_methods.rbの修正です。

FinderMethods#find_nth_from_lastメソッドで結果を返すのに毎回全レコードをloadしていたのを、必要なレコードのみloadするよう修正しています。


Tweak engine for readability

activestorage/lib/active_storage/engine.rbの修正です。

適切な位置にスペースの追加、Arrayを定義するのに[]を使用していたのを、%w()を使用するよう修正しています。


Simply use scope.delete_all instead of constructing delete manager

activerecord/lib/active_record/associations/has_many_through_association.rbの修正です。

HasManyThroughAssociation#delete_recordsメソッドでレコードを削除するのにArel::DeleteManagerを使用して削除用のSQLを組み立ていたのを、scope.delete_allを使用して削除処理を行うよう修正しています。


Remove redundant sentences [ci skip]

activestorage/lib/active_storage/analyzer/image_analyzer.rbactivestorage/lib/active_storage/analyzer/video_analyzer.rbのdocの修正です。

Analyzer::ImageAnalyzerクラス、Analyzer::VideoAnalyzerクラスのdocから不要と思われる説明を削除しています。