Commit Graph

11 Commits

Author SHA1 Message Date
Patrick Robertson
eebb9ddf9b Convert ActiveModel to 1.9 hash syntax.
I also attempted to fix other styleguide violations such as
{ a: :b } over {a: :b} and foo(b: 'bar') over foo( b: 'bar' ).
2013-05-01 18:01:46 -07:00
Yves Senn
b501ee47fa validates_confirmation_of does not override writer methods. 2013-03-04 18:51:34 +01:00
Brian Cardarella
4433b1a99a Support i18n attributes for confirmation 2012-04-24 01:05:41 -04:00
Brian Cardarella
fcc534ed76 confirmation validation error attribute
This will render the error message on :#{attribute}_confirmation instead
of on attribute itself. When rendering confirmation errors inline on the
form with form builders such as SimpleForm and Formtastic it is
confusing to the ender user to see the confirmation error message on the
attribute element. Instead it makes more sense to have this validation
error render on the confirmation field instead.

The i18n message has been updated for the confirmation validator error
message to include the original attribute name.
2012-04-23 17:16:05 -04:00
Josh Kalderimis
605c6455ac removed AR from all AMo tests, including any unneeded files (schema, fixtures and test helper) 2010-05-09 00:08:11 +03:00
Josh Kalderimis
88ad3ed8b5 removed an old unused model in the AMo tests which also removes another AR dependency 2010-05-09 00:08:11 +03:00
Josh Kalderimis
66913a76af removed use of AR in AMo tests and removed testing of scopes (:on) in individual validation tests and moved them to their own test file 2010-05-08 23:51:36 +03: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
Pratik Naik
6173e5bfae Add ActiveModel::Validations tests for regular ruby classes 2009-03-20 22:21:27 +00:00
Pratik Naik
4367f39dea TestDatabase -> TestsDatabase 2009-03-20 16:02:12 +00:00
Pratik Naik
60756ad4ec Move relevant validation tests from Active Record to Active Model 2009-03-20 15:07:49 +00:00