diff options
-rw-r--r-- | actionpack/CHANGELOG.md | 2 | ||||
-rw-r--r-- | actionpack/test/abstract_unit.rb | 1 | ||||
-rw-r--r-- | actionview/lib/action_view/layouts.rb | 2 | ||||
-rw-r--r-- | activerecord/CHANGELOG.md | 9 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 4 | ||||
-rw-r--r-- | activerecord/test/cases/migration/references_statements_test.rb | 2 | ||||
-rw-r--r-- | guides/source/active_record_migrations.md | 4 | ||||
-rw-r--r-- | guides/source/testing.md | 4 | ||||
-rw-r--r-- | railties/CHANGELOG.md | 11 |
9 files changed, 29 insertions, 10 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index 1aeb58a612..d50cbaee38 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -1,4 +1,4 @@ -* Check `request.path_parameters` encoding at the point they're set +* Check `request.path_parameters` encoding at the point they're set. Check for any non-UTF8 characters in path parameters at the point they're set in `env`. Previously they were checked for when used to get a controller diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index 1e1d6f5429..c8a45a0851 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -33,7 +33,6 @@ require 'action_view/testing/resolvers' require 'action_dispatch' require 'active_support/dependencies' require 'active_model' -require 'active_record' require 'pp' # require 'pp' early to prevent hidden_methods from not picking up the pretty-print methods until too late diff --git a/actionview/lib/action_view/layouts.rb b/actionview/lib/action_view/layouts.rb index bcb357a06f..8db1674187 100644 --- a/actionview/lib/action_view/layouts.rb +++ b/actionview/lib/action_view/layouts.rb @@ -255,7 +255,7 @@ module ActionView # nil:: Force default layout behavior with inheritance # # Return value of Proc & Symbol arguments should be String, false, true or nil - # with the meaning as described above. + # with the same meaning as described above. # ==== Parameters # * <tt>layout</tt> - The layout to use. # diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 86d07580e8..1d0e4b32a3 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,12 @@ +* Add newline between each migration in `structure.sql`. + + Keeps schema migration inserts as a single commit, but allows for easier + git diffing. + + Fixes #25504. + + *Grey Baker*, *Norberto Lopes* + * The flag `error_on_ignored_order_or_limit` has been deprecated in favor of the current `error_on_ignored_order`. diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index 396cb0b07a..9e9ace49db 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -998,8 +998,8 @@ module ActiveRecord sm_table = ActiveRecord::Migrator.schema_migrations_table_name if supports_multi_insert? - sql = "INSERT INTO #{sm_table} (version) VALUES " - sql << versions.map {|v| "('#{v}')" }.join(', ') + sql = "INSERT INTO #{sm_table} (version) VALUES\n" + sql << versions.map {|v| "('#{v}')" }.join(",\n") sql << ";\n\n" sql else diff --git a/activerecord/test/cases/migration/references_statements_test.rb b/activerecord/test/cases/migration/references_statements_test.rb index 70c64f3e71..5dddb35c4c 100644 --- a/activerecord/test/cases/migration/references_statements_test.rb +++ b/activerecord/test/cases/migration/references_statements_test.rb @@ -35,7 +35,7 @@ module ActiveRecord assert_not index_exists?(table_name, :user_id) end - def test_create_reference_id_index_even_if_index_option_is_passed + def test_create_reference_id_index_even_if_index_option_is_not_passed add_reference table_name, :user assert index_exists?(table_name, :user_id) end diff --git a/guides/source/active_record_migrations.md b/guides/source/active_record_migrations.md index f914122242..a45becf670 100644 --- a/guides/source/active_record_migrations.md +++ b/guides/source/active_record_migrations.md @@ -241,7 +241,7 @@ generates ```ruby class AddUserRefToProducts < ActiveRecord::Migration[5.0] def change - add_reference :products, :user, index: true, foreign_key: true + add_reference :products, :user, foreign_key: true end end ``` @@ -313,7 +313,7 @@ will produce a migration that looks like this class AddDetailsToProducts < ActiveRecord::Migration[5.0] def change add_column :products, :price, :decimal, precision: 5, scale: 2 - add_reference :products, :supplier, polymorphic: true, index: true + add_reference :products, :supplier, polymorphic: true end end ``` diff --git a/guides/source/testing.md b/guides/source/testing.md index 440d87bf73..26d50bec0c 100644 --- a/guides/source/testing.md +++ b/guides/source/testing.md @@ -879,10 +879,10 @@ can be passed as headers: ```ruby # setting an HTTP Header -get articles_url, headers: "Content-Type" => "text/plain" # simulate the request with custom header +get articles_url, headers: { "Content-Type": "text/plain" } # simulate the request with custom header # setting a CGI variable -get articles_url, headers: "HTTP_REFERER" => "http://example.com/home" # simulate the request with custom env variable +get articles_url, headers: { "HTTP_REFERER": "http://example.com/home" } # simulate the request with custom env variable ``` ### Testing `flash` notices diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index f6552a268b..ef7049e6e5 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -8,6 +8,17 @@ *John Meehan* +* Display name of the class defining the initializer along with the initializer + name in the output of `rails initializers`. + + Before: + disable_dependency_loading + + After: + DemoApp::Application.disable_dependency_loading + + *ta1kt0me* + * Do not run `bundle install` when generating a new plugin. Since bundler 1.12.0, the gemspec is validated so the `bundle install` |