| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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.
|
| |
| |
| |
| |
| |
| | |
Thinking .. relative to files is not natural, we are used
to think "parent of a directory", and we have __dir__
nowadays.
|
| |
| |
| |
| | |
Hash syntax auto-correcting breaks alignments. 411ccbdab2608c62aabdb320d52cb02d446bb39c
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A few have been left for aesthetic reasons, but have made a pass
and removed most of them.
Note that if the method `foo` returns an array, `foo << 1`
is a regular push, nothing to do with assignments, so
no self required.
|
| |
| |
| |
| | |
Some case expressions remain, need to think about those ones.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
| |
| |
| |
| |
| | |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
| |
| |
| |
| |
| | |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
| |
| |
| |
| |
| | |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In Ruby ^ and $ mean start and end of *line*.
A regexp that validates an email should not check if
some line of the string looks like an email, and maybe
be surrounded by the entire Joyce's Ulysses. What the
regexp has to check is if the string itself looks like
an email.
This validator is used only in tests, the ^/$ anchors
implied no risk.
|