2015/03/22分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Rework form helper example to use Person.new
actionview/lib/action_view/helpers/form_helper.rb
のdocの修正です。
先日修正されたform helperのexampleを再度修正しています。
- # @person = Person.create(params[:person]) - # if @person.valid? + # @person = Person.new(params[:person]) + # if @person.save
create
+ valid?
の組み合わせだとvalidationが二回発生してしまいexampleとして良く無いので、通常良く使うnew
+ save
の組合せの方がexampleとして良いだろう、という事で修正したようです。
Merge pull request #19443 from radanskoric/fix-am-errors-deprecation
Actually rename to rake initializers
railties/lib/rails/tasks/initializers.rake
の修正です。
先日rake initializer
-> rake initializers
にタスク名の修正を行ったのですが、doc等だけ修正し、実際のタスク名の方の修正が漏れていたので、改めて修正を行っています。
activerecord/lib/active_record/connection_adapters/postgresql/oid/array.rb
の修正です。
PostgreSQLのarray型 + limitを使用していた場合(ex: t.integer :big_int_data_points, limit: 8, array: true
)に、limitの情報がschema.rb
に出力されないバグがあったのを修正しています。
Merge pull request #19442 from joevandyk/patch-1
activerecord/lib/active_record/relation.rb
のdocの修正です。
find_or_create_by
メソッドのexampleで、ユニークな値を取得する場合のexampleにtransaction処理を追加しています。
# begin - # CreditAccount.find_or_create_by(user_id: user.id) + # CreditAccount.transaction(requires_new: true) do + # CreditAccount.find_or_create_by(user_id: user.id) + # end # rescue ActiveRecord::RecordNotUnique # retry
並列にデータ作成する場合のexampleなので、そもそもtransactionを作成しておかないと期待通りは動作しない為、追加したようです。
Fix typo in belongs_to_required_by_default config's CHANGELOG entry [ci skip]
railties/CHANGELOG.md
の修正です。
belongs_to_required_by_default
をbelongs_to_requred_by_default
にタイポしていた箇所があったのを修正しています。
[ci skip] Change the null
to a not null constraint
rails guideのActive Record Migrations
の修正です。
change_column_null
メソッドの説明を、"カラムをnullにする"、から、"カラムをnot null制約に変える"、に修正しています。