Javan Makhmali
21417e02e9
Work around Firefox's refusal to dispatch events on disabled elements. Fixes #31393
...
Brought to you by a 12 year old Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=329509
2018-01-08 17:07:32 -05:00
George Claghorn
93e6a0ec55
Fix attaching blobs to optimistically-locked records
...
Explicitly declare inverse associations so ActiveStorage::Attachment touches the original record instance.
Closes #31542 .
2018-01-08 14:34:03 -05:00
George Claghorn
edcd32edad
Merge pull request #31650 from rosa/master
...
Allow overriding filename in `Blob#service_url`
2018-01-08 10:35:05 -05:00
Rosa Gutierrez
8f52d93576
Allow overriding filename in Blob#service_url
...
This is useful when we have several representations for the same
underlying file, each one with a different name, and we need to provide
a custom download URL based on that name and not that of the underlying
file.
2018-01-08 15:44:14 +01:00
Ryuta Kamizono
7c69351277
Merge pull request #31648 from dixitp012/rubocop_active_support_test
...
Fix rubocop space before comma
2018-01-08 15:14:14 +09:00
Dixit Patel
0699a3df9a
Fix rubocop space before comma
2018-01-08 10:20:35 +05:30
yuuji.yaginuma
7a0fe78d08
Remove meaningless check
...
`ActiveSupport::OrderedOptions` responds to any message.
2018-01-08 12:25:24 +09:00
Yuji Yaginuma
bd79c651e0
Merge pull request #31547 from eugeneius/use_authenticated_message_encryption_new_framework_defaults
...
Allow use_authenticated_message_encryption to be set in new_framework_defaults_5_2.rb
2018-01-08 12:16:53 +09:00
Eugene Kenny
d2113777a1
Allow use_authenticated_message_encryption to be set in new_framework_defaults_5_2.rb
...
Enabling this option in new_framework_defaults_5_2.rb didn't work
before, as railtie initializers run before application initializers.
Using `respond_to?` to decide whether to set the option wasn't working
either, as `ActiveSupport::OrderedOptions` responds to any message.
2018-01-07 20:13:58 +00:00
Prathamesh Sonpatki
1ba8412607
Fix the desc for image_alt change [ci skip]
2018-01-07 22:29:13 +05:30
Prathamesh Sonpatki
d14029c117
Added deprecation and removal notes for Action View [ci skip]
2018-01-07 22:07:17 +05:30
Prathamesh Sonpatki
1bb99ae7ad
Added deprecations and removals notes for Action Pack [ci skip]
2018-01-07 21:51:51 +05:30
Prathamesh Sonpatki
4d94b1de16
Added release notes for Action Cable [ci skip]
2018-01-07 21:46:00 +05:30
Eileen M. Uchitelle
3b57bf2273
Merge pull request #31610 from prathamesh-sonpatki/improve-deprecation-msg-pr-29358
...
Improve the deprecation message for using subclass of Rails::Application to start the Rails server
2018-01-07 11:03:53 -05:00
Ryuta Kamizono
f614c5f108
Fix deleting through records when using has_many through with source_type
...
Currently deleting through records doesn't respect `source_type`. It
should not be ignored in that case.
Related #23209 .
Fixes #24116 .
2018-01-08 00:58:25 +09:00
Prathamesh Sonpatki
b821f95403
Improve the deprecation message for using subclass of Rails::Application to start the Rails server
2018-01-07 20:48:53 +05:30
George Claghorn
a736e82170
Document automatic width-height swapping [ci skip]
2018-01-07 10:04:14 -05:00
George Claghorn
19185c4dea
Remove redundant sentences [ci skip]
2018-01-07 09:56:45 -05:00
Ryuta Kamizono
455456437c
Simply use scope.delete_all
instead of constructing delete manager
2018-01-07 23:22:20 +09:00
George Claghorn
1223782598
Tweak engine for readability
2018-01-07 09:02:22 -05:00
Ryuta Kamizono
f5328d9379
Make find_nth_from_last
more performant when using reversible order
...
We can use `relation.last(index)[-index]` instead of loading all records
when using reversible order because `last` will call `reverse_order`.
2018-01-07 14:31:18 +09:00
Ryuta Kamizono
68754d3770
Fix last
with offset
to behave consistently with loaded relation
...
Currently `last` with `offset` behaves incorrectly because `offset` can
not be reversed like `limit`. Therefore, `offset` should also be handled
like `limit`.
2018-01-07 12:52:59 +09:00
Ryuta Kamizono
a194c527fa
Fix pluck
with eager loading to respect offset
2018-01-07 11:13:15 +09:00
Ryuta Kamizono
4f8d702413
Revert commit 4ec5b0d6b4d8a57e034b1014942356e95caf47aa in favor of #28379
...
Commit 4ec5b0d was for fixing the regression #18787 , but #28379 fixes
#18787 as well. So 4ec5b0d is no longer necessary.
2018-01-07 10:17:36 +09:00
George Claghorn
1e51a38fbc
Merge pull request #31639 from rosa/master
...
Force :attachment as content disposition for some content types
2018-01-05 11:55:40 -05:00
Rosa Gutierrez
d40284b1a4
Force content disposition to attachment for specific content types
...
In this way we avoid HTML, XML, SVG and other files that can be rendered
by the browser to be served inline by default. Depending on the origin
from where these files are served, this might lead to XSS
vulnerabilities, and in the best case, to more realistic phishing
attacks and open redirects.
We force it rather than falling back to it when other disposition is not
provided. Otherwise it would be possible for someone to force inline
just by passing `disposition=inline` in the URL.
The list of content types to be served as attachments is configurable.
2018-01-05 16:32:32 +01:00
Ryuta Kamizono
5a50146888
Consolidate queue_adapter=
and interpret_adapter
...
Since #25037 , `queue_adapter=` simply delegates to `interpret_adapter`
only.
2018-01-05 17:18:56 +09:00
George Claghorn
e243866d9b
Merge pull request #31637 from wagenet/patch-1
...
Add missing require for `strip_heredoc`
2018-01-04 19:54:13 -05:00
Peter Wagenet
6fe9cc80fc
Add missing require for strip_heredoc
2018-01-04 15:51:03 -08:00
Ryuta Kamizono
39f6c6c641
Remove passing argument to singular and collection association readers
...
Follow up of 09cac8c67afdc4b2a1c6ae07931ddc082629b277.
2018-01-05 08:31:57 +09:00
Prathamesh Sonpatki
07563036b0
Move the options for deliver_later up near to the example [ci skip]
...
- And move the Active Job related section down. Otherwise it was
appearing as if the options are available for the `delivery_job`
setting.
2018-01-04 21:51:30 +05:30
Ryuta Kamizono
7eaae937e6
Partial revert the changing default value of readonly_value
...
This is a partial revert of #26182 . There is no reason to change the
default value.
2018-01-05 00:53:47 +09:00
Ryuta Kamizono
c7b8327301
Merge pull request #31049 from gwincr11/cg-blank
...
Add support for multiple encodings in String.blank?
2018-01-04 23:22:21 +09:00
Ryuta Kamizono
cb86b95b60
Merge pull request #31011 from danielma/dma/assert-changes-with-to-should-still-assert-change
...
`assert_changes` should always assert some change
2018-01-04 23:14:51 +09:00
Ryuta Kamizono
652258e41a
Fix newly added reflection order when redefining association
...
Currently reflections keeps the order when first added even if when
redefining association. As a result of the order, redefining through
association which use newly added association will raise
`HasManyThroughOrderError`. We need to redefine reflection order as well
when redefining association.
Fixes #31068 .
2018-01-04 22:55:16 +09:00
Eileen M. Uchitelle
092c547d7f
Merge pull request #31594 from yuki24/refactor-request-test
...
Refactor tests for request parameters to use more realistic setup
2018-01-04 08:23:25 -05:00
Ryuta Kamizono
e612a47aac
Deprecate valid_alter_table_type?
in sqlite3 adapter
...
This method which is used only in the internal was introduced in
ac384820 and was renamed in #17579 . It does not need to be exposed.
2018-01-04 22:15:15 +09:00
George Claghorn
a72473f032
Configure previewer/analyzer command paths centrally
2018-01-03 22:01:31 -05:00
yuuji.yaginuma
bce675eac4
Correctly handle infinity value in PostgreSQL range type
...
An empty string is an invalid value in Ruby's range class.
So need to handle `Float::INFINITY` as it is and cast it in
`encode_range`.
Fixes #31612
2018-01-04 06:44:53 +09:00
Ryuta Kamizono
ff4f69ff2d
Merge pull request #31632 from fatkodima/configuring.md-fix
...
Move `config.action_view.cache_template_loading` to proper section in configuring.md [ci skip]
2018-01-04 04:02:39 +09:00
fatkodima
eb44c91361
Move config.action_view.cache_template_loading
to proper section in configuring.md [ci skip]
2018-01-03 19:53:51 +02:00
George Claghorn
dbff1cee55
Exclude ActiveStorage::SetBlob from API docs [ci skip]
2018-01-02 22:49:18 -05:00
Matthew Draper
7098f28853
Merge pull request #31331 from dinahshi/postgresql_bulk_update
...
Add bulk alter support for PostgreSQL
2018-01-03 13:15:07 +10:30
Ryuta Kamizono
4ca73f4481
Merge pull request #25456 from ojab/master
...
Remove dormant check
2018-01-03 10:47:04 +09:00
Ryuta Kamizono
b6c6d28d2c
Remove undefined track_deletion
callback [ci skip]
2018-01-03 05:52:54 +09:00
Ryuta Kamizono
401c42e3c3
Merge pull request #27561 from fishbrain/count-all-in-has-many-association
...
Use `count(:all)` in HasManyAssociation#count_records
2018-01-03 05:44:11 +09:00
Ryuta Kamizono
a954e1e817
Merge pull request #29018 from willbryant/missing_attributes_after_save
...
fix the dirty tracking code's save hook overwriting missing attribute…
2018-01-03 05:14:18 +09:00
George Claghorn
921b877c2f
Restore support for the -layers transformation
2018-01-02 07:20:23 -05:00
yuuji.yaginuma
13afd2cfdc
Avoid Minitest 5.11.0 for now
...
Seems some tests not work with Minitest 5.11.0.
* https://travis-ci.org/rails/rails/jobs/323997512#L1053
* https://travis-ci.org/rails/rails/jobs/323997486#L1055
Ref: https://github.com/seattlerb/minitest/issues/729
2018-01-02 17:34:09 +09:00
Javan Makhmali
48de6e9bda
Revert unintentional change in 41e3bbd
2018-01-01 13:24:51 -05:00