2018/04/28分のコミットです。
CHANGELOGへの追加はありませんでした。
Adding precision about which letter case to use for controller names (#32740)
rails guideのRails Routing from the Outside In
の修正です。
Connecting URLs to Code
の項、to
オプションで指定するコントローラ名はスネークケースで記載する必要がある旨説明を追加しています。
Merge pull request #31956 from fatkodima/has_attached-presence-validation
activestorage/lib/active_storage/attached/one.rb
の修正です。
Attached::One
クラスにblank?
メソッドを追加しています。実装はattachment.blank?
の結果を返すようになっています。
attachmentsにvalidationを出来るようにする為との事です。
class User < ActiveRecord::Base has_one_attached :avatar has_many_attached :highlights validates :avatar, presence: true validates :highlights, presence: true end
↑のようにpresenceチェックが出来るようになっています。
Merge pull request #32733 from Edouard-chin/ec-setupand-teardown
activesupport/lib/active_support/test_case.rb
、
activesupport/lib/active_support/testing/setup_and_teardown.rb
の修正です。
ActiveSupport::Testing::SetupAndTeardown
moduleをinclude
でActiveSupport::TestCase
に追加していたのを、prepend
を使うようにし、継承チェインの先頭にはいるよう修正しています。
先頭にいないと、after_teardown
でexceptionが発生した場合のエラーのハンドリング(exceptionが発生しても後処理を継続する処理)が期待通りに動作しない為。
Merge pull request #32727 from utilum/assert_dont_expects
Action Cable、Active Recordのテストの修正です。
mock処理にmochaを使用していたのを、rails内部のヘルパーメソッド(assert_called
、assert_called_with
)を使用するよう修正しています
Merge pull request #30647 from droptheplot/render-partials-string-locals
actionview/lib/action_view/renderer/partial_renderer.rb
の修正です。
partial rendererのlocals
オプションに渡すHashのkeyにStringを使用出来なかったのを、使用出来るよう修正しています。
[ci skip] Fix typo in testing.md
rails guideのTesting Rails Applications
の修正です。
method
をmetod
にタイポしている箇所があったのを修正しています。