| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
model.name_changed?(from: "Pete", to: "Ringo")
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extract **notable changes**, **deprecations** and **removals** from
each CHANGELOG.
I tried to reference the commits and pull requests for new features
and deprecations.
In the process I also made some minor changes to the CHANGELOGS.
The 4_1_release_notes guide is declared WIP.
|
|
|
|
|
|
|
|
| |
See:
- https://github.com/codahale/bcrypt-ruby/pull/63
- https://github.com/codahale/bcrypt-ruby/pull/64
- https://github.com/codahale/bcrypt-ruby/pull/65
|
|\
| |
| |
| |
| |
| |
| | |
Updated DirtyModel's @changed_attributes hash to be symbol/string agnostic
Conflicts:
activemodel/CHANGELOG.md
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
of an instance. When using the attribute_will_change! method, you must
supply a string and not a symbol or the *_changed? method will break
(because it is looking for the attribute name as a string in the keys
of the underlying hash). To remedy this, I simply made the underlying
hash a HashWithIndifferentAccess so it won't matter if you supply
the attribute name as a symbol or string to attribute_will_change!.
|
| |
| |
| |
| | |
[ci skip]
|
| |
| |
| |
| | |
Make AM::Dirty less dirty to plugin into AR or other library
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
chuckbergeron/validates-inclusion-of-accuracy-for-non-numeric-ranges
Greater accuracy for validates_inclusion_of on non-numeric ranges
Closes #10774, fixes #10593
|
| | |
| | |
| | |
| | |
| | |
| | | |
Range#include? for non-numeric ranges
added changelog message
|
|/ /
| |
| |
| | |
If the confirmation was blank, but the password wasn't, it would still save.
|
| |
| |
| |
| | |
their setup in their constructor now.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Add a working example of how to use this new method.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
it only cleared the validations that created :validate callbacks. This
didn't include the validates created by validates_with, so I've added a
method to clear all validations.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Closes #9535.
With 692b3b6 the `password=` setter does no longer set blank passwords.
This triggered validation errors when assigning empty Strings to `password`
and `password_confirmation`.
This patch only sets the confirmation if it is not `blank?`.
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
| |
[ci skip]
|
| |
|
| |
|
|
|
|
| |
Also some minor improvements to other changelogs. [ci skip]
|
| |
|
|
|
|
|
|
| |
absence of attributes.
Add `ActiveModel::Errors#add_on_present` method. Adds error messages to present attributes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
When resetting an attribute, you expect it to return to the state it was
before any changes. Namely, this fixes this unexpected behavior:
~~~ruby
model.name = "Bob"
model.reset_name!
model.name_changed? #=> true
~~~
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
|
|
|
|
|
|
| |
When serialising a class, specify the type of any singular associations, if
necessary. Rails already correctly specifies the :type of any enumerable
association (e.g. a has_many association), but made no attempt to do so for
non-enumerables (e.g. a has_one association).
We must specify the :type of any STI association. A has_one
association to a class which uses single-table inheritance is an example of
this type of association.
Fixes #7471
|
|\
| |
| |
| |
| |
| |
| | |
Length validation handles correctly nil. Fix #7180
Conflicts:
activemodel/CHANGELOG.md
|
| |
| |
| |
| | |
When nil or empty string are not allowed, they are not valid.
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 4e9f53f9736544f070e75e516c71137b7eb49a7a, reversing
changes made to 6b802cdb4f5b84e1bf49aaeb0e994b3be6028af9.
Revert "Don't use tap in this case."
This reverts commit 454d820bf0a18fe1db4c55b0145197d70fef1f82.
Reason: Is not a good idea to add options to this method since we can do
the same thing using method composition.
Person.validators_on(:name).select { |v| v.kind == :presence }
Also it avoids to change the method again to add more options.
|
|
|
|
|
| |
This will filter out the validators on a particular attribute based on
its kind.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to a change in builder, nil values and empty strings now generates
closed tags, so instead of this:
<pseudonyms nil=\"true\"></pseudonyms>
It generates this:
<pseudonyms nil=\"true\"/>
Document this change in Rails so that people can track it down easily if
necessary.
|
|
|
|
|
|
|
|
|
|
| |
Changes in old branches needed to be manually synched in CHANGELOGs of newer ones.
This has proven to be brittle, sometimes one just forgets this manual step.
With this commit we switch to CHANGELOGs per branch. When a new major version is
cut from master, the CHANGELOGs in master start being blank.
A link to the CHANGELOG of the previous branch allows anyone interested to
follow the history.
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
AM::Validation#validates: custom exception for :strict option
Conflicts:
activemodel/CHANGELOG.md
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
https://github.com/rails/rails/issues/6958
- Enable propagation of :skip_types, :dasherize and :camelize on included models by default
- Adding the option to override this propagation on a per-include basis (:include => { :model => { :dasherize => false } }
- Enough tests to prove it works
- Updated activemodel CHANGELOG.md
Squashed my commits
|
|/ |
|