aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | Tweaks CHANGELOGs and docs [ci skip]Ryuta Kamizono2019-03-316-26/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add leading `#` before `=>` since hash rocket is valid Ruby code * add backticks * remove trailing spaces * and more
* | | | | | | | Merge pull request #35688 from jhawthorn/render_file_rfcAaron Patterson2019-03-3013-40/+131
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | RFC: Introduce Template::File
| * | | | | | | | Introduce Template::File as new render file:John Hawthorn2019-03-2713-40/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous behaviour of render file: was essentially the same as render template:, except that templates can be specified as an absolute path on the filesystem. This makes sense for historic reasons, but now render file: is almost exclusively used to render raw files (not .erb) like public/404.html. In addition to complicating the code in template/resolver.rb, I think the current behaviour is surprising to developers. This commit deprecates the existing "lookup a template from anywhere" behaviour and replaces it with "render this file exactly as it is on disk". Handlers will no longer be used (it will render the same as if the :raw handler was used), but formats (.html, .xml, etc) will still be detected (and will default to :plain). The existing render file: behaviour was the path through which Rails apps were vulnerable in the recent CVE-2019-5418. Although the vulnerability has been patched in a fully backwards-compatible way, I think it's a strong hint that we should drop the existing previously-vulnerable behaviour if it isn't a benefit to developers.
* | | | | | | | | Require railties for all Active Storage dependenciesGeorge Claghorn2019-03-301-0/+4
| | | | | | | | |
* | | | | | | | | Specify Active Storage's dependency on Active JobGeorge Claghorn2019-03-302-1/+3
| | | | | | | | |
* | | | | | | | | Merge pull request #35802 from abhaynikam/fix-typo-for-zeitwerk-mode-test-casesRyuta Kamizono2019-03-301-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | [ci skip] Fix typo directores -> directories
| * | | | | | | | | [ci skip] Fix typo directores -> directoriesAbhay Nikam2019-03-301-1/+1
|/ / / / / / / / /
* | | | | | | | | optimizes eager loading in :zeitwerk modeXavier Noria2019-03-302-22/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During initialization, the eager load paths of engines are unshifted into AS::Dependencies.autoload_paths. After that, the collection is frozen. (See the initializers in railties/lib/rails/engine.rb.) Hence, there is no eager load path that is not an autoload path too, and so the array difference in the deleted code is always an empty array. Just do nothing.
* | | | | | | | | fixes eager loading edge case in :zeitwerk modeXavier Noria2019-03-305-9/+60
| | | | | | | | |
* | | | | | | | | Merge pull request #35797 from ↵प्रथमेश Sonpatki2019-03-301-1/+0
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | abhaynikam/35752-update-migration-doc-column-identifier [ci skip] Updated docs to reflect index: true option not available as column modifier
| * | | | | | | | | [ci skip] Updated docs to reflect index: true option not available as column ↵Abhay Nikam2019-03-301-1/+0
| | |/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | modifier
* | | | | | | | | Merge pull request #35798 from ↵प्रथमेश Sonpatki2019-03-301-0/+1
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | abhaynikam/35784-add-extract-associated-method-to-querying-doc [ci skip] Add ActiveRecord::Relation#extract_associated method to the active_record_querying.md
| * | | | | | | | [ci skip] Add ActiveRecord::Relation#extract_associated method to the ↵Abhay Nikam2019-03-301-0/+1
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | active_record_querying.md
* | | | | | | | Add `ActiveRecord::Relation#extract_associated` for extracting associated ↵David Heinemeier Hansson2019-03-294-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | record (#35784) * Add `ActiveRecord::Relation#extract_associated` for extracting associated records from a relation
* | | | | | | | Merge pull request #35794 from kamipo/type_cast_symbol_falseRyuta Kamizono2019-03-304-1/+39
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Type cast falsy boolean symbols on boolean attribute as false
| * | | | | | | | Type cast falsy boolean symbols on boolean attribute as falseRyuta Kamizono2019-03-304-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before 34cc301, type casting by boolean attribute when querying is a no-op, so finding by truthy boolean string (i.e. `where(value: "true") # => value = 'true'`) didn't work as expected (matches it to FALSE in MySQL #32624). By type casting is ensured, a value on boolean attribute is always serialized to TRUE or FALSE. In PostgreSQL, `where(value: :false) # => value = 'false'` was a valid SQL, so 34cc301 is a regresson for PostgreSQL since all symbol values are serialized as TRUE. I'd say using `:false` is mostly a developer's mistake (user's input basically comes as a string), but `:false` on boolean attribute is serialized as TRUE is not a desirable behavior for anybody. This allows falsy boolean symbols as false, i.e. `klass.create(value: :false).value? # => false` and `where(value: :false) # => value = FALSE`. Fixes #35676.
* | | | | | | | | Merge pull request #35792 from ↵Rafael França2019-03-291-3/+3
|\ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | abhaynikam/35789-follow-up-to-update-test-description-for-i18n-customize-full-message Updated the test description for i18n-customize-full-message after rename in #35789
| * | | | | | | | Fixed the test description for i18n-customize-full-message after rename in ↵Abhay Nikam2019-03-301-3/+3
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | #35789
* | | | | | | | Merge pull request #35781 from excid3/rich_text-field-generatorRafael França2019-03-298-14/+81
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Add rich_text field to model generators
| * | | | | | | | Add rich_text field to model generatorsChris Oliver2019-03-288-14/+81
| | | | | | | | |
* | | | | | | | | Merge pull request #35789 from prathamesh-sonpatki/customize-full-messageRafael França2019-03-296-25/+25
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Rename `i18n_full_message` config option to `i18n_customize_full_message`
| * | | | | | | | | Rename `i18n_full_message` config option to `i18n_customize_full_message`Prathamesh Sonpatki2019-03-296-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - I feel `i18n_customize_full_messages` explains the meaning of the config better. - Followup of https://github.com/rails/rails/pull/32956
* | | | | | | | | | Add Active Model release notes for Rails 6 [ci skip] (#35790)प्रथमेश Sonpatki2019-03-291-0/+12
|/ / / / / / / / /
* | | | | | | | | Merge pull request #35788 from prathamesh-sonpatki/fix-annotate-typoKasper Timm Hansen2019-03-295-9/+9
|\ \ \ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | | Fix annotated typo
| * | | | | | | | Fix annotated typoPrathamesh Sonpatki2019-03-295-9/+9
|/ / / / / / / /
* | | | | | | | Add load hook for ActiveStorage::AttachmentGeorge Claghorn2019-03-283-2/+5
| | | | | | | |
* | | | | | | | Add ActiveStorage::Service#openGeorge Claghorn2019-03-286-30/+32
| |_|_|_|_|/ / |/| | | | | |
* | | | | | | Merge pull request #35308 from ↵Rafael França2019-03-284-1/+39
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | erose/better-error-reporting-for-syntax-errors-in-templates Display a more helpful error message when an ERB template has a Ruby syntax error.
| * | | | | | | Add handling and tests.Eli Rose2019-02-174-1/+39
| | | | | | | |
* | | | | | | | Merge pull request #34405 from shugo/safe_buffer_backref_fixMatthew Draper2019-03-282-2/+55
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | sub, sub!, gsub, and gsub! should set back references
| * | | | | | | | Eliminate a thread local variable as suggested by nobuShugo Maeda2019-02-141-8/+1
| | | | | | | | |
| * | | | | | | | Remove trailing spaceShugo Maeda2018-11-081-1/+1
| | | | | | | | |
| * | | | | | | | Add a commented code example of what will be producedShugo Maeda2018-11-081-22/+22
| | | | | | | | |
| * | | | | | | | sub, sub!, gsub, and gsub! should set back referencesShugo Maeda2018-11-082-2/+62
| | | | | | | | |
* | | | | | | | | Merge pull request #35778 from shailesh-kalamkar/fix-typo-testing-guidesRyuta Kamizono2019-03-281-3/+3
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | [ci skip] Fixed testing guides typo `fourty` -> `forty`
| * | | | | | | | | [ci skip] Fixed testing guides typo `fourty` -> `forty`Shailesh Kalamkar2019-03-281-3/+3
|/ / / / / / / / /
* | | | | | | | | Merge pull request #35776 from ↵Rafael França2019-03-273-14/+41
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | owst/fix-range-comparisons-with-excluded-end-range Fix bug in Range comparisons when comparing to excluded-end Range
| * | | | | | | | | Fix bug in Range comparisons when comparing to excluded-end RangeOwen Stephens2019-03-283-14/+41
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: ```ruby (1..10).cover?(1...11) => false ``` After: ```ruby (1..10).cover?(1...11) => true ``` See https://git.io/fjTtz for the commit against Ruby core that added support for Range arguments, with similar handling of this case.
* | | | | | | | | Merge pull request #35775 from jhawthorn/remove_all_symbol_from_mime_allRafael França2019-03-272-1/+14
|\ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / |/| | | | | | | | Remove :all symbol from Mime::ALL
| * | | | | | | | Remove :all symbol from Mime::ALLJohn Hawthorn2019-03-272-1/+14
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .all isn't a valid file extension, so it shouldn't used as a symbol. This also makes Mime::ALL better match how */* is parsed from an Accept header.
* | | | | | | | Merge pull request #35236 from renuo/fix-30467Rafael França2019-03-273-0/+29
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Prohibit sneaky custom params from being drawn (Fix #30467)
| * | | | | | | | Raise if resource custom params contain colonsJosua Schmid2019-03-263-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After this change it's not possible anymore to configure routes like this: routes.draw do resources :users, param: "name/:sneaky" end Fixes #30467.
* | | | | | | | | Merge pull request #35496 from bogdan/right-preloadingRyuta Kamizono2019-03-284-64/+99
|\ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / |/| | | | | | | | Fix preloader to never reset associations in case they are already loaded
| * | | | | | | | Fix preloader to never reset associations in case they are already loadedBogdan Gusiev2019-03-074-64/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the issue when association is preloaded with a custom preload scope which disposes the already preloaded target of the association by reseting it. When custom preload scope is used, the preloading is now performed into a separated Hash - #records_by_owner instead of the association. It removes the necessaty the reset the association after the preloading is complete so that reset of the preloaded association never happens. Preloading is still happening to the association when the preload scope is empty.
* | | | | | | | | Merge pull request #35556 from bdewater/fast-secure-compareMatthew Draper2019-03-281-1/+1
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ / |/| | | | | | | | Stop encoding in secure_compare for speedup
| * | | | | | | | Don't encode in secure_compare for speedupBart de Water2019-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hex encoding is base 16 which makes the original input twice as big. With this change less time need to be spent in fixed_length_secure_compare.
* | | | | | | | | Don't change `collation_connection` in the current connectionRyuta Kamizono2019-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a test case for `collation_connection` session variable, so it should not be changed in any other test. Fixes #35458.
* | | | | | | | | Merge pull request #35758 from Shigeyuki-fukuda/aligned_order_of_argumentRafael França2019-03-261-2/+2
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | Aligned the order of the arguments of render_template and render_with_layout
| * | | | | | | | Aligned the order of the arguments of render_template and render_with_layoutShigeyuki-fukuda2019-03-271-2/+2
| | | | | | | | |
* | | | | | | | | Schema version documentation (#35762)Ken Greeff2019-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update active_record_migrations.md * Change year to match others [Ken Greeff + Rafael Mendonça França]