aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | Move digest path calculation out of loopschneems2018-09-112-10/+22
| | |_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ⚡️⚡️
* | | | | | | | Merge pull request #33815 from mberlanda/mberlanda/enhance-config-forRafael França2018-09-112-3/+53
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Use ActiveSupport::InheritableOptions and deep_symbolize_keys in config_for
| * | | | | | | | refacto: config_for with ActiveSupport::InheritableOptions and symbolized keysMauro Berlanda2018-09-112-3/+53
| | | | | | | | |
* | | | | | | | | use "minitest" consistentlyXavier Noria2018-09-1117-21/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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!).
* | | | | | | | | Merge pull request #33795 from marceloperini/marceloperini/33450-active-storageRafael França2018-09-113-1/+12
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix zero-byte files upload in #33630
| * | | | | | | | | Fix zero-byte files uploadMarcelo Perini Veloso2018-09-063-1/+12
| | | | | | | | | |
* | | | | | | | | | Merge pull request #33785 from bogdanvlviv/follow-up-33773-33779Rafael França2018-09-111-1/+1
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Clarify changelog entry added in #33779 [ci skip]
| * | | | | | | | | | Clarify changelog entry added in #33779 [ci skip]bogdanvlviv2018-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Related to #33773
* | | | | | | | | | | Merge pull request #33824 from yskkin/suppress_loggingRafael França2018-09-117-23/+58
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Skip delivery notification when perform_deliveries is false.
| * | | | | | | | | | | Add `perform_deliveries` to a payload of `deliver.action_mailer` notification.Yoshiyuki Kinjo2018-09-095-27/+41
| | | | | | | | | | | |
| * | | | | | | | | | | Skip delivery notification when perform_deliveries is false.Yoshiyuki Kinjo2018-09-085-1/+22
| | | | | | | | | | | |
* | | | | | | | | | | | Use utf8mb4 character set by default for MySQL database (#33608)Yasuo Honda2018-09-119-12/+25
| |_|_|_|/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/
* | | | | | | | | | | Don't expose `instantiate_instance_of` for internal useRyuta Kamizono2018-09-111-11/+7
| | | | | | | | | | |
* | | | | | | | | | | Refactor object creation from relation to avoid pushing scope attributesRyuta Kamizono2018-09-112-24/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pushing scope attributes was added at d4007d5 for fixing inheritance object creation. But it was not a better fix, since we could just pull that on demand in `Inheritance` module.
* | | | | | | | | | | Don't expose `current_scope` for internal useRyuta Kamizono2018-09-113-18/+17
| | | | | | | | | | |
* | | | | | | | | | | Move `scoping` handling into klass level from relationRyuta Kamizono2018-09-112-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'd like to use this `scoping` handling on klass level to address unwanted internal scoping issues.
* | | | | | | | | | | Remove redundant `all.scoping`Ryuta Kamizono2018-09-111-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `scoping` stashes the reciever and then returning that as `klass.all`. `all.scoping` has no effect to the public behavior, so it is redundant.
* | | | | | | | | | | Remove unused `existing` arg in `SelectManager#collapse`Ryuta Kamizono2018-09-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `existing` arg was added at 8bc0fce, but it is no longer used since aac9da2.
* | | | | | | | | | | Merge pull request #33639 from ↵Ryuta Kamizono2018-09-115-7/+61
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | darwin67/33610-duplicated-nested-records-with-create_with Make sure there are no duplicated nested records with create_with
| * | | | | | | | | | | Fixes #33610Darwin D Wu2018-09-115-7/+61
|/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to avoid double assignments of nested_attributes for `has_many` relations during record initialization, nested_attributes in `create_with` should not be passed into `klass.new` and have them populate during `initialize_internals_callback` with scope attributes. However, `create_with` keys should always have precedence over where clauses, so if there are same keys in both `create_with` and `where_values_hash`, the value in `create_with` should be the one that's used.
* | | | | | | | | | | Use correct variableyuuji.yaginuma2018-09-112-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up of 3e81490717a314437f9123d86fa3e9dc55558e95.
* | | | | | | | | | | Oxford comma [ci skip]Xavier Noria2018-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Followup to a recently merged PR, too minor and detailed to require a modification to the contributed patch.
* | | | | | | | | | | Merge pull request #33823 from stoodfarback/aj_backburner_fix_priorityRafael França2018-09-102-2/+14
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | ActiveJob Backburner adapter: fix priority
| * | | | | | | | | | | ActiveJob Backburner adapter: fix prioritystoodfarback2018-09-072-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The priority wasn't being passed from ActiveJob to Backburner, despite priority being supported. This also brings it inline with the docs, which mark Backburner as supporting priorities in the "Backend Features" table: https://api.rubyonrails.org/classes/ActiveJob/QueueAdapters.html
* | | | | | | | | | | | Merge pull request #33813 from ryanwhocodes/masterXavier Noria2018-09-103-1/+12
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Add #unfreeze_time to ActiveSupport::Testing::TimeHelpers
| * | | | | | | | | | | | Add #unfreeze_time to ActiveSupport::Testing::TimeHelpersryanwhocodes2018-09-103-1/+12
| | | | | | | | | | | | |
* | | | | | | | | | | | | Remove all references to slave in the codebaseRafael Mendonça França2018-09-104-30/+30
| | | | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #33837 from nickstanish/masterRyuta Kamizono2018-09-111-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | docs: Fix typo in activerecord/CHANGELOG.md [ci skip]
| * | | | | | | | | | | | Update CHANGELOG.mdNick Stanish2018-09-101-1/+1
|/ / / / / / / / / / / /
* | | | | | | | | | | | Merge pull request #33826 from tgturner/activejob-retry-attemptsEileen M. Uchitelle2018-09-091-1/+3
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | retry_on argument `attempts` clarification
| * | | | | | | | | | | | clarifies documentation around the attempts arugment to retry_onGraham Turner2018-09-091-1/+3
| | | | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #33825 from bogdanvlviv/follow-up-33637-and-33770Eileen M. Uchitelle2018-09-094-15/+16
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up #33637 and #33770
| * | | | | | | | | | | | | Fix `ActiveRecord::DatabaseConfigurations`'s docsbogdanvlviv2018-09-092-6/+6
| | | | | | | | | | | | | |
| * | | | | | | | | | | | | Fix explanation of `ActiveRecord::Base.configurations.configs_for` in the ↵bogdanvlviv2018-09-091-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CHANGELOG Since #33770 `#configs_for` changed method signature and it isn't supposed to work with a passed block.
| * | | | | | | | | | | | | Fix sqlite3 url config in "Configuring Rails Applications" guidebogdanvlviv2018-09-091-3/+3
| | |_|/ / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See `ConnectionUrlResolver#database_from_path` in `activerecord/lib/active_record/connection_adapters/connection_specification.rb`
* | | | | | | | | | | | | Add missing `perform_enqueued_jobs` to error logging testyuuji.yaginuma2018-09-091-1/+1
| |/ / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without `perform_enqueued_jobs`, job are not executed and assertion is not done.
* | | | | | | | | | | | Consistently use `visitor.compile`Ryuta Kamizono2018-09-092-5/+5
| | | | | | | | | | | |
* | | | | | | | | | | | Revert a writer for `BindParam#value`Ryuta Kamizono2018-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The writer was added during Arel refactoring to pass Active Record tests at 7a29220. That is no longer used since 846832a.
* | | | | | | | | | | | Use `visitor.compile` instead of constructing by connection itselfRyuta Kamizono2018-09-093-7/+3
| | | | | | | | | | | |
* | | | | | | | | | | | `supports_xxx?` returns whether a feature is supported by the backendRyuta Kamizono2018-09-088-44/+32
|/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than a configuration on the connection.
* / / / / / / / / / / reflect c03bba4 in CHANGELOGsXavier Noria2018-09-082-0/+13
|/ / / / / / / / / /
* | | | | | | | | | Merge pull request #33817 from schneems/schneems/dig-simpleRichard Schneeman2018-09-073-6/+9
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Don’t allocate array on no args
| * | | | | | | | | | Don’t allocate array on no argsschneems2018-09-073-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When no dependencies are present to be digested there is no reason to build an array just to turn around and turn it back into a string. The dependencies array is not mutated in this method so we can use the same empty array across all invocations. Total allocated: 791402 bytes (7294 objects) Total allocated: 777442 bytes (7132 objects) (791402 - 777442) / 791402.0 # => 1.76 % speed improvement
* | | | | | | | | | | trace autoloads, and document hints for troubleshootingXavier Noria2018-09-073-4/+101
|/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #32885.
* | | | | | | | | | Merge pull request #33804 from yskkin/num_stringRyuta Kamizono2018-09-084-4/+14
|\ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / / / |/| | | | | | | | | Fix non_numeric_string?
| * | | | | | | | | Fix non_numeric_string?Yoshiyuki Kinjo2018-09-074-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example, dirty checking was not right for the following case: ``` model.int_column = "+5" model.float_column = "0.5E+1" model.decimal_column = "0.5e-3" ``` It is enough to see whether leading character is a digit for avoiding invalid numeric expression like 'wibble' to be type-casted to 0, as this method's comment says. Fixes #33801
* | | | | | | | | | Merge pull request #33615 from ↵Rafael França2018-09-072-3/+63
|\ \ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Larochelle/i18n_full_message_with_nested_attributes `ActiveModel.full_message` interaction with `index_errors`
| * | | | | | | | | Call human_attribute_name with a string instead of a symboleMartin Larochelle2018-08-162-2/+2
| | | | | | | | | |
| * | | | | | | | | `ActiveModel.full_message` interaction with `index_errors`Martin Larochelle2018-08-142-3/+63
| | | | | | | | | |
* | | | | | | | | | Merge pull request #33756 from piecehealth/prEileen M. Uchitelle2018-09-075-2/+122
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Add `inspection_masks` to make values of sensitive database columns w…