なるようになるブログ

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

rails commit log流し読み(2014/12/08)

2014/12/08分のコミットです。

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


Fix grammar of sentence in Reflection documentation

https://github.com/rails/rails/commit/480e911859aa267b7edae18c9d319c2b3a871e73のdocの修正です。

Reflectionのクラスメソッドについての説明について、グラマーの修正を行っています。


minor sentences fixes

activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rbのdocの修正です。

ConnectionPool#Queueクラスの各メソッドのdocについて、グラマーの修正を行っています。


Make error message clearer that :on requires a symbol, not a string

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

after_commitafter_rollbackの引数の:onオプションに指定出来るのは、:create、 :destroy、:updateだけで、それ以外の値を指定した場合エラーになるのですが、 そのエラーメッセージ内の:create、 :destroy、:updateがStringクラスになっていたのですが、実際はStringは指定出来ない(Symbolのみ可能)という事で、エラーメッセージもSymbolで表すよう修正しています。

# before
":on conditions for after_commit and after_rollback callbacks have to be one of create,destroy,update"

# after
":on conditions for after_commit and after_rollback callbacks have to be one of [:create, :destroy, :update]"

Add note to Store about uniqueness validation (#17954) [skip ci]

activerecord/lib/active_record/store.rbのdocの修正です。

store_accessorで定義した値に対してuniquenessチェックを行いたい場合、custom validation を使用する必要がある旨説明を追加しています。