bogdanvlviv
|
3ff2c15837
|
Add cases to test combining validation conditions
- Test condition that is defined by array of conditions
- Test condition that is defined by combining :if and :unless
- Test local condition that is defined by :if
- Test local condition that is defined by :unless
See http://edgeguides.rubyonrails.org/active_record_validations.html#combining-validation-conditions
|
2017-11-06 23:07:51 +00:00 |
|
Kir Shatrov
|
d7b1521db8
|
Use frozen string literal in activemodel/
|
2017-07-16 20:11:16 +03:00 |
|
Matthew Draper
|
87b3e226d6
|
Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590 , reversing
changes made to afb66a5a59 .
|
2017-07-02 02:15:17 +09:30 |
|
Kir Shatrov
|
cfade1ec7e
|
Enforce frozen string in Rubocop
|
2017-07-01 02:11:03 +03:00 |
|
Santiago Pastorino
|
a00bed0c48
|
Revert "Properly interpolate i18n keys in modules [#5572 state:resolved]"
This breaks #6448, you should use :"module/class" as key for namespacing
[#6448 state:committed]
This reverts commit 8d30193b08 .
|
2011-02-27 21:30:03 -02:00 |
|
Santiago Pastorino
|
acf0688fdd
|
failing test for i18n key collision with namespaced models
|
2011-02-27 21:23:52 -02:00 |
|
Rodrigo Rosenfeld Rosas
|
8d30193b08
|
Properly interpolate i18n keys in modules [#5572 state:resolved]
|
2010-09-24 20:41:12 +02:00 |
|
José Valim
|
017f5d5308
|
Fix typo by renaming :genre to :gender.
|
2010-01-09 00:18:07 +01:00 |
|
José Valim
|
7045c4c279
|
Allow validates to map some types to specific options. So now you can do:
validates :email, :presence => true, :format => /@/
validates :genre, :inclusion => %w(m f)
validates :password, :length => 6..20
|
2010-01-08 21:36:04 +01:00 |
|
José Valim
|
47a5fd4c4b
|
Allow :if, :unless, :on, :allow_nil and :allow_blank as shared options in validates.
|
2010-01-07 19:23:59 +01:00 |
|
José Valim
|
74098e4cb6
|
No need to use ValidationsRepairHelper hack on ActiveModel anymore, Model.reset_callbacks(:validate) is enough. However, tests in ActiveRecord are still coupled, so moved ValidationsRepairHelper back there.
|
2009-12-23 13:30:58 +01:00 |
|
José Valim
|
e31077c9aa
|
Small clean up in Naming and TTranslation tests.
|
2009-12-23 12:28:02 +01:00 |
|
Pratik Naik
|
6173e5bfae
|
Add ActiveModel::Validations tests for regular ruby classes
|
2009-03-20 22:21:27 +00:00 |
|
Pratik Naik
|
08a99d0eac
|
Add I18n translations to ActiveModel and move more AR specific parts to ActiveRecord::Validations
|
2009-03-20 21:45:13 +00:00 |
|