- 21 11月, 2018 1 次提交
-
-
由 Daniel Lopez Prat 提交于
-
- 07 9月, 2018 1 次提交
-
-
由 Ryuta Kamizono 提交于
Fixing code block rendering, indentation, backticks, etc.
-
- 23 8月, 2018 1 次提交
-
-
由 Ryuta Kamizono 提交于
The purpose of fe9547b6 is to work type casting to value from database. But that was caused not to use the value before type cast even except Active Record. There we never guarantees that the value before type cast was going to the used in this validation, but we should not change the behavior unless there is some particular reason. To restore original behavior, still use the value before type cast if `came_from_user?` is undefined (i.e. except Active Record). Fixes #33651. Fixes #33686.
-
- 12 8月, 2018 1 次提交
-
-
由 bogdanvlviv 提交于
Related to #31503
-
- 08 7月, 2018 1 次提交
-
-
由 bogdanvlviv 提交于
Since we have `has_secure_token`, it is too confusing to use `_token` suffix with `has_secure_password`. Context https://github.com/rails/rails/pull/33307#discussion_r200807185
-
- 12 6月, 2018 1 次提交
-
-
由 bogdanvlviv 提交于
Add mention about default value of `config.active_model.i18n_full_message`.
-
- 14 3月, 2018 1 次提交
-
-
由 Rafael Mendonça França 提交于
We only add the header when releasing to avoid some conflicts. [ci skip]
-
- 28 2月, 2018 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 18 2月, 2018 1 次提交
-
-
由 Jeremy Daer 提交于
Skipping over 2.4.0 to sidestep the `"symbol_from_string".to_sym.dup` bug. References #32028
-
- 31 1月, 2018 1 次提交
-
-
由 Rafael Mendonça França 提交于
:tada::tada::tada:
-
- 24 1月, 2018 1 次提交
-
-
由 Sean Griffin 提交于
We don't implement much custom marshalling logic for these objects, but the proc default case needs to be handled separately. Unfortunately there's no way to just say "do what you would have done but with this value for one ivar", so we have to manually implement `marshal_load` as well. The test case is a little bit funky, but I'd really like an equality test in there, and there's no easy way to add one now that this is out of AR (since the `attributes` method isn't here) Fixes #31216
-
- 19 12月, 2017 1 次提交
-
-
由 Yoshiyuki Hirano 提交于
I found a bug that validation callbacks don't fire on multiple context. So I've fixed it. Example: ```ruby class Dog include ActiveModel::Validations include ActiveModel::Validations::Callbacks attr_accessor :history def initialize @history = [] end before_validation :set_before_validation_on_a, on: :a before_validation :set_before_validation_on_b, on: :b after_validation :set_after_validation_on_a, on: :a after_validation :set_after_validation_on_b, on: :b def set_before_validation_on_a; history << "before_validation on a"; end def set_before_validation_on_b; history << "before_validation on b"; end def set_after_validation_on_a; history << "after_validation on a" ; end def set_after_validation_on_b; history << "after_validation on b" ; end end ``` Before: ``` d = Dog.new d.valid?([:a, :b]) d.history # [] ``` After: ``` d = Dog.new d.valid?([:a, :b]) d.history # ["before_validation on a", "before_validation on b", "after_validation on a", "after_validation on b"] ```
-
- 29 11月, 2017 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 28 11月, 2017 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 06 11月, 2017 1 次提交
-
-
由 bogdanvlviv 提交于
-
- 26 10月, 2017 1 次提交
-
-
由 Matt Rohrer 提交于
This brings the Length validator in line with the Numericality validator, which currently supports Proc & Symbol arguments
-
- 08 7月, 2017 1 次提交
-
-
由 Jahfer Husain 提交于
ActiveModel::Errors#merge! allows ActiveModel::Errors to append errors from a separate ActiveModel::Errors instance onto their own. Example: person = Person.new person.errors.add(:name, :blank) errors = ActiveModel::Errors.new(Person.new) errors.add(:name, :invalid) person.errors.merge!(errors) puts person.errors.messages # => { name: ["can't be blank", "is invalid"] }
-
- 28 6月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
[ci skip]
-
- 27 5月, 2017 1 次提交
-
-
由 Bradley Priest 提交于
a user input for a decimal column were ignored by numerically validations
-
- 30 4月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
* Remove trailing spaces. * Add backticks around method and command. * Fix indentation.
-
- 29 3月, 2017 1 次提交
-
-
由 Jon Moss 提交于
This CHANGELOG.md is a continuation of the 5-1-stable one, there shouldn't be any duplicate entries. [ci skip]
-
- 28 3月, 2017 1 次提交
-
-
由 bogdanvlviv 提交于
Before: person.errors.keys # => [] person.errors.values # => [] person.errors[:name] # => [] person.errors.keys # => [:name] person.errors.values # => [[]] After: person.errors.keys # => [] person.errors.values # => [] person.errors[:name] # => [] person.errors.keys # => [] person.errors.values # => [] Related to #23468
-
- 22 3月, 2017 1 次提交
-
-
由 Matthew Draper 提交于
-
- 04 3月, 2017 1 次提交
-
-
由 Mike Mangino 提交于
-
- 24 2月, 2017 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 18 2月, 2017 1 次提交
-
-
由 namusyaka 提交于
-
- 07 2月, 2017 2 次提交
-
-
由 Rafael Mendonça França 提交于
-
由 yuuji.yaginuma 提交于
`ActiveModel::TestCase` is used only for the test of Active Model. Also, it is a private API and can not be used in applications. Therefore, it is not necessary to include it in lib.
-
- 22 11月, 2016 1 次提交
-
-
由 Kenichi Kamiya 提交于
`#[]` has already applied indifferent access, but some methods does not. `#include?`, `#has_key?`, `#key?`, `#delete` and `#full_messages_for`.
-
- 15 10月, 2016 1 次提交
-
-
由 Iain Beeston 提交于
ie. DecimalWithoutScale, Text and UnsignedInteger
-
- 12 10月, 2016 2 次提交
-
-
由 Unathi Chonco 提交于
This change now creates a method `#authenticate_XXX` where XXX is the configured attribute name on `#has_secure_password`. `#authenticate` is now an alias to this method when the attribute name is the default 'password'
-
由 Unathi Chonco 提交于
existing `#has_secure_password`. This can be useful when one would like to store some secure field as a digest, just like a password. The method still defaults to `password`. It now also allows using the same `#authenticate` method which now accepts a second argument for specifying the attribute to be authenticated, or will default to 'password`. A new method is also added for generating a new token for an attribute by calling `#regenerate_XXXX` where `XXXX` is the attribute name.
-
- 11 10月, 2016 2 次提交
-
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
`#get`, `#set`, `[]=`, `add_on_empty` and `add_on_blank`.
-
- 10 5月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 07 5月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 06 5月, 2016 1 次提交
-
-
由 Prathamesh Sonpatki 提交于
- Improve CHANGELOG entry for #18439. - The documentation is updated as per changes in PR #18439 to the `accept` option. - The explanation about the virtual attribute is moved at the end so that the arity of `accept` option is explained first. - Added a note that `message` can also be passed to `validates_acceptance_of`.
-
- 28 4月, 2016 1 次提交
-
-
由 eileencodes 提交于
-
- 05 4月, 2016 1 次提交
-
-
由 Prathamesh Sonpatki 提交于
- Pass object to I18n helper so that when calling message proc, it will pass that object as argument to the proc and we can generate custom error messages based on current record being validated. - Based on https://github.com/rails/rails/issues/856. [Łukasz Bandzarewicz, Prathamesh Sonpatki]
-
- 25 2月, 2016 1 次提交
-
-
由 eileencodes 提交于
Adds changelog headers for beta3 release
-