aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | | | | | | 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…
| * | | | | | | | | | | | | Configuration item `config.filter_parameters` could also filter out ↵Zhang Kang2018-09-075-2/+122
|/ / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sensitive value of database column when call `#inspect` * Why Some sensitive data will be exposed in log accidentally by calling `#inspect`, e.g. ```ruby @account = Account.find params[:id] payload = { account: @account } logger.info "payload will be #{ payload }" ``` All the information of `@account` will be exposed in log. * Solution Add a class attribute filter_attributes to specify which values of columns shouldn't be exposed. This attribute equals to `Rails.application.config.filter_parameters` by default. ```ruby Rails.application.config.filter_parameters += [:credit_card_number] Account.last.insepct # => #<Account id: 123, credit_card_number: [FILTERED] ...> ```
* | | | | | | | | | | | | Formatting CHANGELOGs [ci skip]Ryuta Kamizono2018-09-076-28/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixing code block rendering, indentation, backticks, etc.
* | | | | | | | | | | | | Use canonical name for block localyuuji.yaginuma2018-09-072-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `spec` is the same variable name as gemspec generated by bundler, and its intention is easier to understand than a one-letter variable. https://github.com/bundler/bundler/blob/00fd58eaa69015092ee272c4cb5aa92a5e7ee45c/lib/bundler/templates/newgem/newgem.gemspec.tt#L11 This is follow up on 1c59b4840c58097186022f68427c46e0046c5d0d. `spec` is already in use there.
* | | | | | | | | | | | | Merge pull request #33808 from itsbagpack/fix-access-safety-buffer-sliceAaron Patterson2018-09-063-3/+20
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maintain html_safe? on sliced HTML safe strings
| * | | | | | | | | | | | | Update CHANGELOG for SafetyBuffer slice accessYumin Wong2018-09-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: no-itsbackpack <no-itsbackpack@github.com>
| * | | | | | | | | | | | | Use assert_predicate insteadYumin Wong2018-09-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: no-itsbackpack <no-itsbackpack@github.com>
| * | | | | | | | | | | | | SafeBuffer should maintain safety upon getting a slice via a range if ↵Yumin Wong2018-08-312-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | original buffer was safe. Co-Authored-By: no-itsbackpack <no-itsbackpack@github.com>
* | | | | | | | | | | | | | Merge pull request #33810 from schneems/schneems/doc-output-bufferRichard Schneeman2018-09-062-0/+19
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Document ActionView::OutputBuffer
| * | | | | | | | | | | | | | [ci skip] Doc ActionView::OutputBufferschneems2018-09-062-3/+17
| | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | [ci skip] Clarify CaptureHelper#capture functionschneems2018-09-061-0/+5
| |/ / / / / / / / / / / / /
* | | | | | | | | | | | | | Merge pull request #33809 from fidalgo/improve-remove-column-documentationRichard Schneeman2018-09-061-0/+1
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] Improve remove_column documentation
| * | | | | | | | | | | | | | [ci skip] Improve remove_column documentationPaulo Fidalgo2018-09-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since when we remove one column it will also remove the associated indexes, we must ensure this behaviour is properly documented. In this commit we add a line to the documentation mentioning this behaviour.
* | | | | | | | | | | | | | | Merge pull request #33807 from olimart/patch-4Rafael França2018-09-061-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix typo in i18n_railtie.rb [ci skip]
| * | | | | | | | | | | | | | | Fix typo in i18n_railtie.rbOlivier2018-09-061-1/+1
|/ / / / / / / / / / / / / / /