| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As pointed out by @matthewd this change makes ImmutableString aware
of MysqlString's existence whereas previously MysqlString was only
overriding public API.
cc @kamipo
This reverts commit e632c2fa4cb60072a778ce95c952a0fa95e5b074, reversing
changes made to 334a7dcf107cd3ff1697163d331d289d6d65dcd7.
|
| |
| |
| |
| |
| |
| | |
The only difference between `Type::ImmutableString` and its subclasses
is the representation of the casted booleans. Prefer extracting
`casted_true`/`casted_false` and override these by subclasses.
|
| |
| |
| |
| |
| |
| | |
Missed in 37d956f. Fixes #27524.
[ MSathieu & Kasper Timm Hansen ]
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
| |
If a Error object was serialized in the database as YAML in the Rails
4.2 version, if we load in the Rails 5.0 version it will miss the
@details instance variable so methods like #clear and #add will start to
fail.
|
|\
| |
| |
| | |
Moved database-specific ActiveModel types into ActiveRecord
|
| |
| |
| |
| | |
ie. DecimalWithoutScale, Text and UnsignedInteger
|
|\ \
| | |
| | | |
Fix `apply_seconds_precision` not to be affected by `mathn`
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently `apply_seconds_precision` cannnot round usec
when after `require 'mathn'`.
```
irb(main):001:0> 1234 / 1000 * 1000
=> 1000
irb(main):002:0> 1234 - 1234 % 1000
=> 1000
irb(main):003:0> require 'mathn'
=> true
irb(main):004:0> 1234 / 1000 * 1000
=> 1234
irb(main):005:0> 1234 - 1234 % 1000
=> 1000
```
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In Rails 4.1, Action View was extracted from Action Pack, but this
change was not reflected in the API documentation of ActiveModel::Model.
This commits makes it explicit in the documentation that Active Model
also interacts with Action View as well as Action Pack.
[ci skip]
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| | |
In ActiveModel::Model API documentation, referrences to Rails
components were tagged with fixed-width font and named as if
they were modules.This fixes the inconsistency to match API
documentation conventions.
[ci skip]
|
| |
| |
| |
| |
| |
| | |
`#[]` has already applied indifferent access, but some methods does not.
`#include?`, `#has_key?`, `#key?`, `#delete` and `#full_messages_for`.
|
| |
| |
| |
| |
| | |
The test runner was updated to make use of autorun. This caused the
`bin/test` scripts to run Minitest twice.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now a few tests in ActiveModel rely on Ruby implementation and the fact
that in MRI `97.18` as a float is greater than `97.18` as a BigDecimal.
This is only relevant for MRI. On JRuby, comparing float to BigDecimal
would be conversion of them to the same type and they will be equal.
I'd like the ActiveModel test suite to be Ruby implementation-agnostic.
Here we test ActiveModel, not the Ruby internals.
This PR fixes a couple more JRuby tests.
|
|\ \
| | |
| | | |
Add missing `+` around a some literals.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Mainly around `nil`
[ci skip]
|
|\ \ \
| | | |
| | | | |
remove warning from big integer test
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This removes the following warnings.
```
activemodel/test/cases/type/big_integer_test.rb:15: warning: ambiguous first argument; put parentheses or a space even after `-' operator
```
|
|/ / / |
|
| | | |
|
|/ /
| |
| |
| |
| |
| | |
Regexp#match? should be considered to be part of the Ruby core library. We are
emulating it for < 2.4, but not having to require the extension is part of the
illusion of the emulation.
|
| | |
|
|\ \
| | |
| | | |
Refactored ActiveModel::Type tests into their own files
|
| |/ |
|
|\ \
| |/
|/| |
|
| |
| |
| |
| | |
Should be ActiveRecord::Attributes (ActiveModel::Attributes does not exist)
|
| | |
|
| |
| |
| |
| | |
`#get`, `#set`, `[]=`, `add_on_empty` and `add_on_blank`.
|
|\ \
| |/
|/| |
Print the proper ::Float::INFINITY value when used as a default value
|
| |
| |
| |
| | |
Addresses https://github.com/rails/rails/issues/22396
|
| | |
|
| | |
|
|\ \
| | |
| | | |
improve error message when include assertions fail
|
| | |
| | |
| | |
| | |
| | |
| | | |
assert [1, 3].includes?(2) fails with unhelpful "Asserting failed" message
assert_includes [1, 3], 2 fails with "Expected [1, 3] to include 2" which makes it easier to debug and more obvious what went wrong
|
|/ / |
|
| |
| |
| | |
Fix potentially misleading example.
|
| |
| |
| |
| |
| |
| | |
All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772.
But comments was still kept absolute position. This commit aligns
comments with method definitions for consistency.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Recently, the Rails team made an effort to keep the source code consistent, using Ruboco
(bb1ecdcc677bf6e68e0252505509c089619b5b90 and below). Some of the case
statements were missed.
This changes the case statements' formatting and is consistent with changes
in 810dff7c9fa9b2a38eb1560ce0378d760529ee6b and db63406cb007ab3756d2a96d2e0b5d4e777f8231.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
NumericalityValidator#validate_each is never called when allow_nil is true and
the value is nil because it is already skipped in EachValidator#validate.
|
| |
| |
| |
| | |
Signed-off-by: Guillermo Iguaran <guilleiguaran@gmail.com>
|
| |
| |
| | |
This fixes a copy-and-paste-issue slipped in by #18996
|
| |
| |
| |
| |
| |
| |
| |
| | |
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces
Fix all violations in the repository.
|