| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Update the Rails security guide [ci skip]
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bring up-to-date the information about the session id in the
Sessions section. The guide currently says that the session
id is a md5 hash while the implementation uses a random hex
string.
Fixes #25032.
[ci skip]
|
| |
| |
| |
| |
| | |
Leftover from an earlier commit, chose to fix because I was
just down in this file.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Per request digest caches were added before we had hooks into
different units of work that Rails performs.
As such the most reliable way to prevent stale cache digests
was with a middleware. The middleware prevented staleness in
Action Controller requests.
However, the executor is superior because it should also prevent
staleness when running just Active Job jobs or broadcasting
through Action Cable's server.
|
|\ \
| | |
| | | |
Forward ActiveRecord::Relation#count to Enumerable#count if block given
|
| | | |
|
|\ \ \
| | | |
| | | | |
Introduce Date#all_day
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Useful for queries like:
Item.where(created_at: Date.current.all_day)
There was already a Time#all_day with the same behaviour, but for
queries like the above, Date is more convenient.
|
|\ \ \ \
| |_|_|/
|/| | | |
Keep previous state around for nested calls to #suppress
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
If a call to #suppress from the same class occurred inside another #suppress
block, the suppression state would be set to false before the outer block
completes.
This change keeps the previous state around in memory and unwinds it
as the blocks exit.
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
Fix bug in JSON deserialization when column default is an empty string
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When `ActiveRecord::Coders::JSON` serialization is used and the default of the column returns `''` it raises the following error:
```
JSON::ParserError: A JSON text must at least contain two octets!
```
If MySQL is running in non-strict mode, it returns an empty string as column default for a text column:
```ruby
def extract_default
if blob_or_text_column?
@default = null || strict ? nil : ''
end
end
```
Since `''` is invalid JSON, there shouldn't be an attempt to parse it, it should be treated like nil.
ActiveRecord::Coders::JSON should behave consistently for all possible non-user-set column default values.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Rails 5.1 point type should not raise exception if empty string is provided as input
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
as value
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Follows the same pattern as controllers and jobs. Exceptions raised in
delivery jobs (enqueued by `#deliver_later`) are also delegated to the
mailer's rescue_from handlers, so you can handle the DeserializationError
raised by delivery jobs:
```ruby
class MyMailer < ApplicationMailer
rescue_from ActiveJob::DeserializationError do
…
end
```
ActiveSupport::Rescuable polish:
* Add the `rescue_with_handler` class method so exceptions may be
handled at the class level without requiring an instance.
* Rationalize `exception.cause` handling. If no handler matches the
exception, fall back to the handler that matches its cause.
* Handle exceptions raised elsewhere. Pass `object: …` to execute
the `rescue_from` handler (e.g. a method call or a block to
instance_exec) against a different object. Defaults to `self`.
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Add some assertions for BigDecimal#to_s
|
| | | | | | |
|
|/ / / / / |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Conventionally envs are ordered development -> test -> production.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Add Action Cable guide to list
|
| | |/ / /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This effectively publishes the "Action Cable Overview" guide. If we
don't think this is ready for the prime time, we can mark it as a "work
in progress" guide.
[ci skip]
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Document and test ActionDispatch server_port
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Conflicts:
guides/source/configuring.md
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
ActionController::Metal.ancestors` command for api apps.
[ci skip]
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
vs configuring the server itself
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
config.action_dispatch.x_sendfile_header in configuring guide
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
be quoted as how other config options are. They are already quoted at many places. This change, makes this usage consistent. Note that, this is quoting literal values true and false, not truthy values
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
was needed before. [ci skip]
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
option
[ci skip]
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
[ci skip]
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
[ci skip]
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
human readable form [ci skip]
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
level why we are doing this.
[ci skip]
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Perfomance fix for ActiveSupport Enumerable#index_by
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Calculating -------------------------------------
before 34.731k i/100ms
after 48.206k i/100ms
-------------------------------------------------
before 508.451k (± 1.2%) i/s - 2.570M
after 720.068k (± 0.9%) i/s - 3.615M
Comparison:
after: 720067.6 i/s
before: 508451.1 i/s - 1.42x slower
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
Add missing space and newline for clarity
|
| | |_|/ / / /
| |/| | | | | |
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
Add notes on cosmetic patches to contributing guidelines
|
|/ / / / / / |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The error message that we give today makes this error difficult to debug
if you receive it. I have no clue why we're printing the object ID of
the class (the commit doesn't give context), but I've left it as it was
deliberate.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Rename test method
|
|/ / / / / / |
|
| |/ / / /
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When looking for mutation, we compare the serialized version of the
value to the before_type_cast form. `Type::Serialized` was breaking this
contract by passing the already serialized attribute to the subtype's
mutation detection. This never manifested previously, as all mutable
subtypes either didn't do anything in their `serialize` method, or had a
way to detect double serialization (e.g. `is_a?(String)`). However, now
that JSON types can handle string primitives, we need to avoid double
serialization.
Fixes #24993.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
|