- 13 9月, 2018 10 次提交
-
-
由 Fumiaki MATSUSHIMA 提交于
-
由 Ryuta Kamizono 提交于
Eager loading/preloading should be worked regardless of large number of records
-
由 Rafael França 提交于
Use faster globs for template resolving
-
由 John Hawthorn 提交于
-
由 Rafael Mendonça França 提交于
In production the query cache was already being loaded before the first request even without #33856, so added a test to make sure of it. This new test is passing even if #33856 is reverted.
-
由 John Hawthorn 提交于
-
由 Rafael França 提交于
Include test helpers in ActionDispatch::IntegrationTest
-
由 Ricardo Díaz 提交于
As @dhh brings up, the point of `ActionDispatch::IntegrationTest` is to allow users to test the integration of all the pieces called by a controller. Asserting about the emails and jobs queued is part of that task. This commit includes the `ActionMailer::TestHelper` and `ActiveJob::TestHelper` modules when the ActionMailer and ActiveJob railties are initialized respectively.
-
由 Rafael França 提交于
Faster multiple_of? method
-
由 Rafael França 提交于
Follow up #33756
-
- 12 9月, 2018 24 次提交
-
-
由 bogdanvlviv 提交于
Also remove `# :nodoc:` for `ActiveRecord::Core::ClassMethods` in order to show non-nodoc methods in that module on the api docs http://edgeapi.rubyonrails.org
-
由 bogdanvlviv 提交于
It would allow `filter_attributes` to be reused across multiple calls to `#inspect` or `#pretty_print`. - Add `require "set"` - Remove `filter_attributes` instance reader. I think there is no need to keep it.
-
由 bogdanvlviv 提交于
- Move ``` filter_attributes = self.filter_attributes.map(&:to_s).to_set filter_attributes.include?(attribute_name) && !read_attribute(attribute_name).nil? ``` to private method. - Fix tests in `activerecord/test/cases/filter_attributes_test.rb` - Ensure that `teardown` sets `ActiveRecord::Base.filter_attributes` to previous state. - Ensure that `Admin::Account.filter_attributes` is set to previous state in the "filter_attributes could be overwritten by models" test. Follow up #33756
-
由 bogdanvlviv 提交于
Add mention that `config.filter_parameters` also filters out sensitive values of database columns when call `#inspect` since #33756.
-
由 Eileen M. Uchitelle 提交于
Fix query cache to load before first request
-
由 Eileen Uchitelle 提交于
In a test app we observed that the query cache was not enabled on the first request. This was because the query cache hooks are installed on load and active record is loaded in the middle of the first request. If we remove the `on_load` from the railtie the query cache hooks will be installed before the first request, allowing the cache to be enabled on that first request. This is ok because query cache doesn't load anything else, only itself so we're not eager loading all of active record before the first request, just the query cache hooks. [Eileen M. Uchitelle & Matthew Draper]
-
由 Yuji Yaginuma 提交于
Update test_helper_test.rb
-
由 Sharang Dashputre 提交于
Fix typo `wiht` -> `with`
-
由 rigani 提交于
-
由 Rafael França 提交于
Update action_mailer_basics.md
-
由 Sharang Dashputre 提交于
Add backticks to code
-
由 Rafael França 提交于
Run yarn install relative to Rails.root
-
由 Rafael França 提交于
Disable content security policy for mailer previews
-
由 Rafael Mendonça França 提交于
TaggedLogging to return a new logger instance
-
由 Richard Schneeman 提交于
Move digest path calculation out of loop
-
由 Rafael França 提交于
Use ActiveSupport::InheritableOptions and deep_symbolize_keys in config_for
-
由 Xavier Noria 提交于
The name of the minitest library is spelled that way: regular font, and lowercase. Lowercase is used even at the beginning of sentences, see http://docs.seattlerb.org/minitest/ I double-checked this with @zenspider too (thanks!).
-
由 Rafael França 提交于
Fix zero-byte files upload in #33630
-
由 schneems 提交于
On every iteration of generating a cache for a collection a “digest path” is calculated even though it’s exactly the same for every element. This PR exposes a method `digest_path_from_virtual` that returns back a “digest_path”. This can in turn be passed back into `cache_fragment_name`. This not only does less work, but it also (you guessed it) uses less memory. before: Total allocated: 762539 bytes (7035 objects) after: Total allocated: 743590 bytes (6621 objects) (762539 - 743590)/ 762539.0 # => 2.4% faster
⚡ ️⚡ ️ -
由 Mauro Berlanda 提交于
-
由 Rafael França 提交于
Clarify changelog entry added in #33779 [ci skip]
-
由 Rafael França 提交于
Skip delivery notification when perform_deliveries is false.
-
由 Yasuo Honda 提交于
* Use utf8mb4 character set by default `utf8mb4` character set supports supplementary characters including emoji. `utf8` character set with 3-Byte encoding is not enough to support them. There was a downside of 4-Byte length character set with MySQL 5.5 and 5.6: "ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes" for Rails string data type which is mapped to varchar(255) type. MySQL 5.7 supports 3072 byte key prefix length by default. * Remove `DEFAULT COLLATE` from Active Record unit test databases There should be no "one size fits all" collation in MySQL 5.7. Let MySQL server choose the default collation for Active Record unit test databases. Users can choose their best collation for their databases by setting `options[:collation]` based on their requirements. * InnoDB FULLTEXT indexes support since MySQL 5.6 it does not have to use MyISAM storage engine whose maximum key length is 1000 bytes. Using MyISAM storag engine with utf8mb4 character set would cause "Specified key was too long; max key length is 1000 bytes" https://dev.mysql.com/doc/refman/5.6/en/innodb-fulltext-index.html * References "10.9.1 The utf8mb4 Character Set (4-Byte UTF-8 Unicode Encoding)" https://dev.mysql.com/doc/refman/5.7/en/charset-unicode-utf8mb4.html "10.9.2 The utf8mb3 Character Set (3-Byte UTF-8 Unicode Encoding)" https://dev.mysql.com/doc/refman/5.7/en/charset-unicode-utf8.html "14.8.1.7 Limits on InnoDB Tables" https://dev.mysql.com/doc/refman/5.7/en/innodb-restrictions.html > If innodb_large_prefix is enabled (the default), the index key prefix limit is 3072 bytes > for InnoDB tables that use DYNAMIC or COMPRESSED row format. * CI against MySQL 5.7 Followed this instruction and changed root password to empty string. https://docs.travis-ci.com/user/database-setup/#MySQL-57 * The recommended minimum version of MySQL is 5.7.9 to support utf8mb4 character set and `innodb_default_row_format` MySQL 5.7.9 introduces `innodb_default_row_format` to support 3072 byte length index by default. Users do not have to change MySQL database configuration to support Rails string type. https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_default_row_format https://dev.mysql.com/doc/refman/5.7/en/innodb-restrictions.html > If innodb_large_prefix is enabled (the default), > the index key prefix limit is 3072 bytes for InnoDB tables that use DYNAMIC or COMPRESSED row format. * The recommended minimum version of MariaDB is 10.2.2 MariaDB 10.2.2 is the first version of MariaDB supporting `innodb_default_row_format` Also MariaDB says "MySQL 5.7 is compatible with MariaDB 10.2". - innodb_default_row_format https://mariadb.com/kb/en/library/xtradbinnodb-server-system-variables/#innodb_default_row_format - "MariaDB versus MySQL - Compatibility" https://mariadb.com/kb/en/library/mariadb-vs-mysql-compatibility/ > MySQL 5.7 is compatible with MariaDB 10.2 - "Supported Character Sets and Collations" https://mariadb.com/kb/en/library/supported-character-sets-and-collations/
-
由 Ryuta Kamizono 提交于
Since 213796fb, bind params are used for IN clause if enabled prepared statements. Unfortunately, most adapter modules have a limitation for # of bind params (mysql2 65535, pg 65535, sqlite3 250000). So if eager loading large number of records at once, that query couldn't be sent to the database. Since eager loading/preloading queries are auto-generated by Active Record itself, so it should be worked regardless of large number of records like as before. Fixes #33702.
-
- 11 9月, 2018 6 次提交
-
-
由 Ryuta Kamizono 提交于
-
由 Ryuta Kamizono 提交于
Pushing scope attributes was added at d4007d5a for fixing inheritance object creation. But it was not a better fix, since we could just pull that on demand in `Inheritance` module.
-
由 Ryuta Kamizono 提交于
-
由 Ryuta Kamizono 提交于
I'd like to use this `scoping` handling on klass level to address unwanted internal scoping issues.
-
由 Ryuta Kamizono 提交于
`scoping` stashes the reciever and then returning that as `klass.all`. `all.scoping` has no effect to the public behavior, so it is redundant.
-
由 Ryuta Kamizono 提交于
The `existing` arg was added at 8bc0fce0, but it is no longer used since aac9da25.
-