2020/12/29分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Raises an
ArgumentError
when the first argument ofActiveSupport::Notification.subscribe
is invalid. - add
RedisCacheStore#stats
method similar toMemCacheStore#stats
. Callsredis#info
internally.
Handle when Spring is not installed
railties/lib/rails/generators/rails/app/templates/bin/spring.tt
の修正です。
CIのようなSpring
がインストールされてない環境でbin/spring
が実行された場合にエラーにならないよう修正しています。
Fix typos, grammar, and formatting [ci-skip]
rails guideの修正です。
各箇所のタイポ、フォーマットの修正等を行っています。
Make ActiveRecord::AttributeMethods::Query respect getter overwrites in the model
activerecord/lib/active_record/attribute_methods/query.rb
の修正です。
ActiveRecord::AttributeMethods::Query
で値を返す際に、modelでattributeと同名のメソッドが定義されている場合、そのメソッドの戻り値を返すよう修正しています。
class User def admin false end end user = User.first user.update(admin: true) user.admin? #=> # false
Merge pull request #40930 from agrobbin/action-dispatch-ssl-raw-request-method
actionpack/lib/action_dispatch/middleware/ssl.rb
の修正です。
不正なHTTPメソッドが指定されている場合に、Action Dispatch SSL middlewareでActionController::UnknownHttpMethod
がraiseされてしまっていたのを修正しています。
actionpack/lib/action_dispatch/middleware/ssl.rb
の修正です。
不要な定数のfreeze
処理を削除しています。
Merge pull request #40215 from vlado/file_path_joining_in_generator
railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt
の修正です。
tmp
配下のcaching-dev.txt
をチェックする際の処理を、他の箇所と同様におこなうよう修正しています。
Merge pull request #39626 from vipulnsward/as-notification-args
activesupport/lib/active_support/notifications/fanout.rb
の修正です。
ActiveSupport::Notification.subscribe
の最初の引数に不正な値が指定された場合に、ArgumentError
をraiseするよう修正しています。
Add CHANGELOG entry for #39626
activesupport/CHANGELOG.md
の修正です。
先のActiveSupport::Notification.subscribe
の対応について、CHANGELOGにエントリーを追加しています。
Consistently render button_to
as <button>
Action View、railtiesの修正です。
button_to
メソッドが生成するタグが引数に指定された値によって、<input type="submit">
と<button type="submit">
にわかれていたのを、引数の値にかかわらず<button type="submit">
を生成するよう修正しています。
button
とinput
ではattributeの扱い方やsubmit時の挙動が違い、混乱の元となる為。
config.action_view.button_to_generates_button_tag
にfalseを指定すると、元の通りinput
とbutton
両方生成した場合生成する挙動になるようになっています。
Support aliases to expires_in for cache stores
activesupport/lib/active_support/cache.rb
の修正です。
expires_in
オプションのaliasとして、expire_in
、expired_in
を使用出来るよう修正しています。
expires_in
は間違いやすい、かつ、間違えた場合にエラーにならず動作してしまい、間違いに気付きにくい為、間違えのケースとして多いと思われる、expire_in
、expired_in
も使用出来るようにしています。
Merge pull request #39575 from jonathanhefner/clarify-null_store-behavior
rails guideのCaching with Rails: An Overview
の修正です。
ActiveSupport::Cache::NullStore
についての説明について、言い回しを修正しています。
Support selenium-webdriver 4
Gemfile
、actionpack/lib/action_dispatch/system_testing/browser.rb
の修正です。
selenium-webdriver 4系のサポートとして、browser optionsの指定方法を修正、及び、Railsのテストでselenium-webdriver 4系を使用するよう修正しています。
Make sure the :if options of callbacks is not mutated
Active Model、Active Recordの修正です。
callbacksのif
オプションに指定した値自身を変更しないよう修正しています。with_options
のようなoptionsを使いまわす処理と一緒に使用した際にエラーになるのを避ける為。
Merge pull request #40960 from abhaynikam/40956-route-table-dark-mode
actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb
の修正です。
routes table用のCSSにdark mode用のスタイルを追加しています。
Move set_options_for_callback
into Callbacks::ClassMethods
activemodel/lib/active_model/validations/callbacks.rb
の修正です。
Make sure the :if options of callbacks is not mutated で変更したset_options_for_callback
メソッドの定義箇所が誤っていたのを修正しています。
add stats method on RedisCacheStore similar to MemCacheStore
activesupport/lib/active_support/cache/redis_cache_store.rb
の修正です。
redis serverの状態を取得する為のRedisCacheStore#stats
メソッドを追加しています。実装はredis#info
を呼び出しているだけ。
add locale argument to ActiveModel::Name initialize
activemodel/lib/active_model/naming.rb
の修正です。
ActiveModel::Name#initialize
の引数にlocale
を追加しています。指定されたlocale
は、initialize
内部でActiveSupport::Inflector.pluralize
を実行する際に使用されるようになっています。
CHANGELOGの修正です。
フォーマットの修正や、不要なスペースの削除を行っています。