2014/11/26分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Fixing wrong link in 'Ruby on Rails 3.0 Release Notes' [ci skip]
guides/source/3_0_release_notes.md
の修正です。
Arelについての記事のリンクが誤っていたのを修正しています。
do not trigger AR lazy load hook before initializers ran.
activerecord/lib/active_record/railtie.rb
の修正です。
rake_tasks
の先頭で行なっていたactive_record/base
のrequire処理を削除しています。
active_record/base
のrequireを実行すると、active_record.set_configs
のイニシャライズが直ぐ実行されてしまうのですが、先頭だとconfig/initializers
の読み込み処理が終わっていない為、initializersで設定した値が反映されない、という問題があったので、修正したようです。
activerecord/lib/active_record/migration.rb
、
activerecord/lib/active_record/railties/databases.rake
の修正です。
一旦deprecateになったdb:test:prepare
タスクを、deprecateから戻しています。
理由としては、
- プラグインに、test databaseの初期化処理のフックポイントを提供する為
- test用databaseを強制的にシンクする為の方法を提供する為
CSS fix for the router visualizer
actionpack/lib/action_dispatch/journey/visualizer/fsm.css
の修正です。
router visualizerのスタイルが崩れてしまうケースがあったのを修正しています。
Setting an association replaces records with the same id in memory
activerecord/lib/active_record/associations/collection_association.rb
の修正です。
associationに同じIDの異なるインスタンスのレコードを設定した場合に、値が正しく置き換えられなかったバグがあったのを修正しています。
テストより。
bulb = Bulb.create! car = Car.create!(bulbs: [bulb]) new_bulb = Bulb.find(bulb.id) new_bulb.name = "foo" car.bulbs = [new_bulb] assert_equal "foo", car.bulbs.first.name
本来、最後のcar.builds.first.name
は途中で設定した"foo"になるはずですが、これは"foo"にならず、最初にbuld
を作成した時の値のままになってしまっていたようです。
Remove Web Console /console references in the guides
guides/source/4_2_release_notes.md
、
guides/source/upgrading_ruby_on_rails.md
の修正です。
Web Consoleのterminalのマウント機能についての説明を削除しています。
web-consoleのissueによると、terminalのマウント機能は別gemとして切り出し、現在のWeb Consoleからは削除するようです。
Local vars should exist in partials for falsy :object:
values too
actionview/lib/action_view/renderer/partial_renderer.rb
の修正です。
partialに指定出来るobject
オプションの値がfalseの場合、値を渡さないよう修正しています。
Move PG float quoting to the correct location
activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
の修正です。
Float型の場合のquote処理をquote_string
の中に移動しています。
Use released rails-dom-testing
gemspecの修正です。リリース済みのrails-dom-testing
を使用するよう修正しています。
gemspecの修正です。リリース済みのarel
を使用するよう修正しています。
Merge pull request #17733 from yuki24/do-not-rescue-exception-in-params-parser
actionpack/lib/action_dispatch/middleware/params_parser.rb
の修正です。
parse_formatted_parameters
メソッドでException
をrescueいていたのを削除しています。
- rescue Exception => e # JSON or Ruby code block errors + rescue => e # JSON or Ruby code block errors
NoMemoryError
等が起きた場合もParseError
エラーに丸められてしまっていたので、修正したようです。
railties/lib/rails/generators/app_base.rb
の修正です。
Gemfileの生成処理に箇所にタイポがあり、syntax errorがおきていたのを修正しています。
Generators add foreign keys on references
generatorの修正です。
generatorでreferences
オプションを使用した場合、マイグレーションにforeign keysを追加するよう修正しています。
bin/rails generate model account supplier:references
class CreateAccounts < ActiveRecord::Migration def change create_table :accounts do |t| t.references :supplier, index: true t.timestamps null: false end add_foreign_key :accounts, :suppliers end end
actionview/lib/action_view/renderer/partial_renderer.rb
の修正です。
先に行ったpartialの対応で、rubyのwarningが出力されるようになってしまったので、処理を修正しています。
Use web_console 2.0 for 4.2.0.rc1 release
railties/lib/rails/generators/rails/app/templates/Gemfile
の修正です。
web_console
の2.0を使用するよう修正しています。
Merge pull request #17728 from jcutrell/jcutrell/docs-to_session_value-for-pr
actionpack/lib/action_dispatch/middleware/flash.rb
のdocの修正です。
ActionDispatch::Flash::FlashHash#to_session_value
メソッドにdocを追加しています。
Gemfile
、
railties/lib/rails/generators/app_base.rb
の修正です。
jquery-rails
の4.0を使用するよう修正しています。
Clarify where result goes, and supported formats of generate task.
guides/Rakefile
のdocの修正です。
guides:generate
タスクで生成されるdocのフォーマットについての説明を追加しています。
getting the location of the server
actionpack/lib/action_controller/base.rb
のdocの修正です。
docにlocationを取得するexampleがあるのですが、その中でrequest.env["SERVER_ADDR"]
の代わりに、request.env["REMOTE_ADDR"]
を使用するよう修正しています。 そもそも、SERVER_ADDR
のというkeyで値の取得は出来ないような。
actionpack/lib/action_controller/base.rb
のdocの取得です。
不要な空行を削除しています。
actionpack/lib/action_controller/log_subscriber.rb
の修正です。
こちらも不要な空行を削除しています。
Active Record change log pass [skip ci]
activerecord/CHANGELOG.md
の修正です。
- グラマーとスペルの修正
- "PostgreSQL"に表記を統一
- backticksの追加
- 1行を80文字に抑えるよう修正
を行っています。
Use absolute_path of caller_locations to infer engine root
railties/lib/rails/engine.rb
の修正です。
inherited
メソッドで、caller_locations
を取得する際、 path
ではなくabsolute_path
の値を取得するよう修正しています。
- caller_locations.map(&:path) + caller_locations.map(&:absolute_path)
path
だとファイル名しか取得出来ないので、フルパスで取得出来るように、ですかね。
actionpack/lib/action_dispatch/routing/mapper.rb
の修正です。
app
メソッドでネストしているifを減らすようリファクタリングしています。
Provide support for SQL Server connections with dbconsole using sqsh
railties/lib/rails/commands/dbconsole.rb
の修正です。
dbconsoleで"sqlserver"が使用出来るよう対応を追加しています。
railsでsqlserver…。中々に辛そうな感じですが…。
Add #record attribute to RecordNotFound and RecordDestroyed exceptions.
activerecord/lib/active_record/errors.rb
の修正です。
RecordNotSaved
、RecordNotDestroyed
クラスにrecordアトリビュートを追加しています。
これにより、上記エラーが発生した際、エラーが発生したレコードの情報を取得出来るようになりました。
begin complex_operation_that_internally_calls_destroy! rescue ActiveRecord::RecordNotDestroyed => invalid puts invalid.record.errors end
various error classes: added newlines & removed :nodoc: flag from public attribute.
activerecord/lib/active_record/errors.rb
、
activerecord/lib/active_record/validations.rb
の修正です。
public APIからのnodocの削除、改行の追加等を行っています。
Merge pull request #17761 from pschrammel/master
railties/lib/rails/commands/dbconsole.rb
の修正です。
PostgreSQLのadapterの判定式を修正しています。
- when "postgresql", "postgres", "postgis" + when /^postgres|^postgis/