aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | Split messages and to_hashlulalala2019-03-311-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix double wrapping issue Revert messages_for wrapping. It's a new method so no need to put deprecation warnings.
| * | | | Raise deprecation for calling `[:f] = 'b'` or `[:f] << 'b'`lulalala2019-03-3113-50/+155
| | | | | | | | | | | | | | | | | | | | Revert some tests to ensure back compatibility
| * | | | Add deprecation to slice!lulalala2019-03-312-5/+5
| | | | |
| * | | | Nested attribute error's attribute name to use different key:lulalala2019-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | To keep the same as SHA dcafe995bfe51e53dd04607956be9b54073e9cb6
| * | | | String override options in #import to convert to symbollulalala2019-03-311-0/+5
| | | | |
| * | | | Allow errors to remove duplicates, and ensure cyclic associations w/ ↵lulalala2019-03-314-4/+37
| | | | | | | | | | | | | | | | | | | | | | | | | autosave duplicate errors can be removed See SHA 7550f0a016ee6647aaa76c0c0ae30bebc3867288
| * | | | Add messages_forlulalala2019-03-311-1/+7
| | | | |
| * | | | Add a transitional method `objects`, for accessing the array directly.lulalala2019-03-312-6/+7
| | | | | | | | | | | | | | | | | | | | This is because we try to accommodate old hash behavior, so `first` and `last` now does not return Error object.
| * | | | Backward compatibility for errors.collect/select etc.lulalala2019-03-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | All enumerable methods must go through the `each` so it retain old hash behavior. Revert this after Rails 6.1 in order to speed up enumerable methods.
| * | | | Fix spec as generate_message is no longer called during validationlulalala2019-03-312-0/+17
| | | | |
| * | | | Use errors#import instead of manipulating errors/details hashlulalala2019-03-311-13/+8
| | | | |
| * | | | Add convenience method group_by_attributelulalala2019-03-312-20/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many operations need grouping of errors by attributes, e.g. ActiveRecord::AutosaveAssociation#association_valid? Refactor other methods using group_by_attribute
| * | | | Change errorslulalala2019-03-314-159/+363
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow `each` to behave in new way if block arity is 1 Ensure dumped marshal from Rails 5 can be loaded Make errors compatible with marshal and YAML dumps from previous versions of Rails Add deprecation warnings Ensure each behave like the past, sorted by attribute
| * | | | Add ActiveModel::Error and NestedErrorlulalala2019-03-315-16/+321
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add initialize_dup to deep dup. Move proc eval and flexible message position out to Errors, because proc eval is needed for Errors#added? and Errors#delete
| * | | | Fix misalignment caused by SHA eebb9ddf9ba559a510975c486fe59a4edc9da97dlulalala2019-03-312-7/+7
| | | | |
* | | | | Start Rails 6.1 developmentRafael Mendonça França2019-04-2435-3197/+101
| | | | |
* | | | | Merge pull request #35869 from ↵Ryuta Kamizono2019-04-255-4/+81
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | abhaynikam/35866-add-touch-option-for-has-one-association Adds missing touch option to has_one association
| * | | | | Adds touch option to has_one associationAbhay Nikam2019-04-255-4/+81
| | | | | |
* | | | | | Fix markup in CHANGELOGs [ci skip]Ryuta Kamizono2019-04-252-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | Need to new line to break line in the markdown.
* | | | | | Merge pull request #36079 from sharang-d/update-changelogGeorge Claghorn2019-04-241-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Update changelog for a bug-fix to read better [ci skip]
| * | | | | | Update changelog for a bug-fix to read better [ci skip]Sharang Dashputre2019-04-241-1/+1
|/ / / / / /
* | | | | | Merge pull request #36072 from itsWill/dont_fail_on_unsuported_imagesGeorge Claghorn2019-04-243-4/+24
|\ \ \ \ \ \ | | | | | | | | | | | | | | Don't fail ImageAnalyzer on unsupported types
| * | | | | | Don't fail ImageAnalyzer on unsupported typesGuilherme Mansur2019-04-243-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix: #36065 The IamgeAnalyzer passes a image to ImageMagick without checking if the image is supported by ImageMagick. This patch checks that image is supported and if not logs an error and returns an empty hash instead of raising an error. This is the same error handling we do when we encounter a LoadError when mini_magick is not installed.
* | | | | | | Avoid redundant `attribute_alias?` before `attribute_alias`Ryuta Kamizono2019-04-249-31/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we want to get alias resolved attribute finally, we can use `attribute_alias` directly. For that purpose, avoiding redundant `attribute_alias?` makes alias attribute access 40% faster. https://gist.github.com/kamipo/e427f080a27b46f50bc508fae3612a0e Before (2c0729d8): ``` Warming up -------------------------------------- user['id'] 102.668k i/100ms user['new_id'] 80.660k i/100ms user['name'] 99.368k i/100ms user['new_name'] 81.626k i/100ms Calculating ------------------------------------- user['id'] 1.431M (± 4.0%) i/s - 7.187M in 5.031985s user['new_id'] 1.042M (± 4.2%) i/s - 5.243M in 5.039858s user['name'] 1.406M (± 5.6%) i/s - 7.055M in 5.036743s user['new_name'] 1.074M (± 3.6%) i/s - 5.387M in 5.024152s ``` After (this change): ``` Warming up -------------------------------------- user['id'] 109.775k i/100ms user['new_id'] 103.303k i/100ms user['name'] 105.988k i/100ms user['new_name'] 99.618k i/100ms Calculating ------------------------------------- user['id'] 1.520M (± 6.7%) i/s - 7.574M in 5.011496s user['new_id'] 1.485M (± 6.2%) i/s - 7.438M in 5.036252s user['name'] 1.538M (± 5.4%) i/s - 7.737M in 5.049765s user['new_name'] 1.516M (± 4.6%) i/s - 7.571M in 5.007293s ```
* | | | | | | Merge pull request #36074 from kamipo/in_clause_lengthRyuta Kamizono2019-04-2410-167/+75
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix sliced IN clauses to be grouped
| * | | | | | | Fix sliced IN clauses to be groupedRyuta Kamizono2019-04-2410-167/+75
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up of #35838. And also this refactors `in_clause_length` handling is entirely integrated in Arel visitor.
* | | | | | | Re-organize `init_internals`Ryuta Kamizono2019-04-241-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Avoid duplicated `@new_record` assignment * Extract `define_attribute_methods` into `init_internals`
* | | | | | | Simplify restore state conditionRyuta Kamizono2019-04-241-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up to b1458218c95d85c4ce911dd3e99da5ae7cf7aeee.
* | | | | | | Lazy allocate `@_start_transaction_state`Ryuta Kamizono2019-04-242-8/+10
| |/ / / / / |/| | | | |
* | | | | | Merge pull request #36069 from st0012/remove-redundant-test-setupRafael França2019-04-231-21/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Remove redundant test setups in log_subscriber_test
| * | | | | | Remove redundant test setups in log_subscriber_testst00122019-04-241-21/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because controllers' `perform_caching` config is `true` by default, it means we actually enable the caching in all those tests implicitly (and it works). Which also means we can avoid repeatedly declaring that and just specify it once in the setup method (just for declaration).
* | | | | | | Merge pull request #36067 from st0012/update-generator-for-api-appRafael França2019-04-233-0/+11
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Remove action_controller.perform_caching from api app's configs
| * | | | | | | Remove action_controller.perform_caching from api app's configsst00122019-04-243-0/+11
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As suggested in https://github.com/rails/rails/issues/35602#issuecomment-485833483, because we don't provide view caching and doesn't include `ActionController::Caching` for api apps, we should also avoid generating ```ruby config.action_controller.perform_caching = true ``` for those api apps. So it won't confuse people. **But because `perform_caching` will be `true` if not set, the behavior of the app would still be the same without these configs.**
* | | | | | | Merge pull request #36070 from imechemi/fix-minor-api-docRyuta Kamizono2019-04-241-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Minor API doc fix [ci skip]
| * | | | | | | Fix rdoc rendering for push alias symbolTenzin Chemi2019-04-231-1/+1
| | |/ / / / / | |/| | | | |
* | | | | | | Merge pull request #35852 from larouxn/resurrectionRafael França2019-04-232-0/+9
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Resurrect external JS/CS generation
| * | | | | | | Burn unnecessary files 🔥Nicholas La Roux2019-04-053-19/+0
| | | | | | | |
| * | | | | | | Style fixesNicholas La Roux2019-04-051-3/+3
| | | | | | | |
| * | | | | | | Resurrect generator templatesNicholas La Roux2019-04-052-0/+4
| | | | | | | |
| * | | | | | | Resurrect js/js engine options and generatorsNicholas La Roux2019-04-053-0/+24
| | | | | | | |
* | | | | | | | Rename local variable `n` to `name`Ryuta Kamizono2019-04-242-3/+3
| |/ / / / / / |/| | | | | |
* | | | | | | Merge pull request #36066 from st0012/update-controller-cache-docRafael França2019-04-231-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Update document about perform_caching's default value [ci skip]
| * | | | | | | Update document about perform_caching's default valuest00122019-04-241-2/+2
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clarify that both `config.action_controller.perform_caching` and `config.action_mailer.perform_caching`'s default are `true`. This default is set in `AbstractController::Caching`. One can verify this by commenting out all ``` @controller.perform_caching = true ``` in `actionpack/test/controller/caching_test.rb` and run the tests. They should still pass.
* | | | | | | Make association builder methods privateRyuta Kamizono2019-04-247-1/+16
| | | | | | |
* | | | | | | Merge pull request #35928 from ↵Gannon McGibbon2019-04-231-1/+1
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | flanger001/form-with-does-not-generate-ids-by-default Make docs on form_with_generates_ids config option match the value
| * | | | | | Make docs on form_with_generates_ids config option match the valueDavid Shaffer2019-04-231-1/+1
|/ / / / / / | | | | | | | | | | | | | | | | | | [skip ci]
* | | | | | Merge pull request #36061 from shioyama/update_commentRafael França2019-04-231-2/+3
|\ \ \ \ \ \ | | | | | | | | | | | | | | Update comment in attribute_method_matchers_matching
| * | | | | | Update comment in attribute_method_matchers_matchingChris Salzberg2019-04-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current comment here is from 2011 and its original context has changed completely. The plain matcher will not "match every time" anymore since the code now filters all matchers, and only selects those for which the captured attribute is valid. To avoid confusion, I updated the comment. For more discussion, see: https://github.com/rails/rails/pull/36005
* | | | | | | Merge pull request #36063 from ↵Rafael França2019-04-231-8/+0
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | albertoalmagro/finish-documentation-for-after-save-commit Remove reminiscences from previous documentation
| * | | | | | | Remove reminiscences from previous documentation [ci skip]Alberto Almagro2019-04-231-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In #35861 documentation for `after_save_commit` was added, but also old documentation was adapted. I think adapting the old documentation is not necessary because there are already examples for `after_commit` on `:destroy` above. On top of that the action invoked by the callback on `:destroy` (`:log_user_saved_to_db`) talks about saving when the object is destroyed, which can be misleading. As I believe the documentation added by #35861 is already enough this patch removes the modified part, which made sense before adding docs for `after_save_commit` but is already covered by other parts of this guide.