| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
[ci skip]
It's been a source of confusion that the lower-level `add_column`
referenced the higher level `column` method for available options.
`column` supports additional functionality like `index: true` that is
not present on `add_column`.
This patch moves common option documentation to `add_column` and only
documents the additional options in `column`.
|
|\ \
| | |
| | | |
typo
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| | |
Ok, this explains why the branch showed as green. We don't run files in
isolation for PRs, only for master. Active Support monkeypatches
`BigDecimal#to_s`, so the generated error message was different
depending on if the file was run in isolation
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The error message when asserting `greater_than: BigDecimal.new` will
give an error message based on how BigDecimal displays itself. Big
decimal appears to always use scientific notation. This might not be the
best error message for the general case, but the general case wouldn't
use big decimal for the validation. And if they do, they likely need
this level of precision.
|
|\ \
| | |
| | | |
Revert " Added an example to show how common secrets can be shared ac…
|
|/ /
| |
| |
| | |
multiple environments in secrets.yml"
|
|\ \
| | |
| | | |
Use the post-type-cast version of the attribute to validate numericality
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This fixes the issue where you may be comparing (using a numeric
validator such as `greater_than`) numbers of a specific Numeric type
such as `BigDecimal`.
Previous behavior took the numeric value to be validated and
unconditionally converted to Float. For example, due to floating point
precision, this can cause issues when comparing a Float to a BigDecimal.
Consider the following:
```
validates :sub_total, numericality: {
greater_than: BigDecimal('97.18')
}
```
If the `:sub_total` value BigDecimal.new('97.18') was validated against
the above, the following would be valid since `:sub_total` is converted
to a Float regardless of its original type. The result therefore becomes
Kernel.Float(97.18) > BigDecimal.new('97.18')
The above illustrated behavior is corrected with this patch by
conditionally converting the value to validate to float.
Use the post-type-cast version of the attribute to validate numericality
[Roque Pinel & Trevor Wistaff]
|
|\ \ \
| | | |
| | | | |
FileStore: Long cache keys may result in too long paths due to encoding
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Added an example to show how common secrets can be shared across multiple environments in secrets.yml [ci skip]
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | | |
Fix for activerecord join dependency instantiate bug
|
|/| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This is a separate commit, as it is not just a changelog conflict. Want
to point out the changes in the code
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
use only object_id instead parent class and parent id
test cases
assert_equal
use table name in references
fix minor problems
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
Handle invalid UTF-8 strings when HTML escaping
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Use `ActiveSupport::Multibyte::Unicode.tidy_bytes` to handle invalid UTF-8
strings in `ERB::Util.unwrapped_html_escape` and `ERB::Util.html_escape_once`.
Prevents user-entered input passed from a querystring into a form field from
causing invalid byte sequence errors.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We use one period after spaces, not two.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Collection input propagates input's id to the label's for attribute.
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Use Module.prepend instead of alias_method and unify behavior of all Numeric extensions
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
alias_method
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Allow select using Arel and perform a count
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
It allows a query like `User.select(:name).count` to be written
using Arel as `User.select(User.arel_table[:name]).count`.
It exposes the calculations API to accept Arel nodes:
`User.count(User.arel_table[:name])`, `User.sum(User.arel_table[:id])`,
`Account.average(Account.arel_table[:credit_limit])`,
`Account.maximum(Account.arel_table[:credit_limit])` and
`Account.minimum(Account.arel_table[:credit_limit])`.
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Set active_record config for always creating uuids in generators
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
parse RSS/ATOM responses as XML, not HTML
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Fixed multibyte-chars slice! behavior to return nil for out-of-bound
parameters
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Given that this pull request affects a mutable value, we need to test
for and document the affects on the receiver in this case.
Additionally, this pull request was missing a CHANGELOG entry.
|
|/ / / / / / / / / / |
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
vrybas/guides-clarify-belongs-to-required-by-default
[Rails Guides] clarify `belongs_to_required_by_default` option [ci skip]
|
| | | | | | | | | | | |
|
|/ / / / / / / / / /
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Original:
* `config.active_record.belongs_to_required_by_default` is a boolean
value and controls whether `belongs_to` association is required by
default.
Modified version:
* `config.active_record.belongs_to_required_by_default` is a boolean
value and controls whether validation error is triggered by
default if `belongs_to` association is not present or not valid.
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
activerecord guide: clarified roles of valid method and errors object [ci skip]
|
| | | | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Round some numbers more humanely
|
| | | | | | | | | | | | |
|
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Fix #20869
|
|\ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
Add missed available transformations to Migration Doc [ci skip]
|
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
[ci skip]
|
|\ \ \ \ \ \ \ \ \ \ \ \ \
| |_|_|_|/ / / / / / / / /
|/| | | | | | | | | | | |
| | | | | | | | | | | | | |
Fix find_by with association subquery issue
|
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
In this commit, find_by doesn't cache arguments
so that find_by with association subquery works correctly.
Fixes #20817
|
|\ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
ActiveSupport: Fixing issue when delegating to methods named "block", "args", or "arg"
|
| | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
I messed up the merge conflict, and accidentally removed a schema query
that needed to be ignored.
|
|\ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
Qualify column names in calculation
|
|/ / / / / / / / / / / / / /
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
Column names inserted via `group` have to be qualified with table name.
|
|\ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
Match table names exactly on MySQL
|
|/| | | | | | | | | | | | | | |
|