Rafael Mendonça França
2a663dcf09
Remove Array.wrap call in ActiveModel
2012-01-06 01:04:33 -03:00
bradrobertson
2e62af310d
correct documentation on initialize method to accept a single parameter
2011-10-26 09:31:37 -04:00
Evgeniy Dolzhenko
c317419359
Use .add instead of << to add errors
2011-10-11 14:13:08 +01:00
Prem Sichanugrist
733bfa63f5
Remove `#among?` from Active Support
...
After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now.
It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`.
2011-04-13 20:25:28 +08:00
David Heinemeier Hansson
d1575ae1b9
Change Object#either? to Object#among? -- thanks to @jamesarosen for the suggestion!
2011-04-12 00:23:07 +02:00
Prem Sichanugrist
a9f3c9da01
Using Object#in? and Object#either? in various places
...
There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
2011-04-11 03:17:09 +08:00
Mike Gehard
58de03f077
Add additional text to NotImplementedErrors [ #6328 state:resolved]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-03-12 13:43:23 -02:00
Vijay Dev
f99db5a6a8
formatting changes
2011-03-07 23:56:16 +05:30
Paco Guzman
14c254aba3
Remove Example headers. Code just flows with the text. 6ce844a3
2011-03-06 22:34:01 +01:00
Alexey Mahotkin
dfebdb1b03
Tiny fixes to rdoc
2010-09-16 17:10:36 +04:00
José Valim
599e46bf24
Revert "Setup explicit requires for files with exceptions. Removed them from autoloading."
...
Booting a new Rails application does not work after this commit [#5359 state:open]
This reverts commit 38a421b34d
.
2010-09-02 21:11:03 +02:00
Łukasz Strzałkowski
38a421b34d
Setup explicit requires for files with exceptions. Removed them from autoloading.
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-02 11:54:04 +02:00
Santiago Pastorino
b451de0d6d
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
2010-08-14 04:12:33 -03:00
José Valim
84081fcc54
Freeze options so we raise an error when people modify it in place.
2010-08-03 15:36:23 +02:00
Xavier Noria
755af49755
edit pass to apply API guideline wrt the use of "# =>" in example code
2010-07-30 02:30:04 +02:00
Evgeniy Dolzhenko
ef404c771d
Fix a bunch of minor spelling mistakes
2010-06-15 12:04:22 +04:00
Xavier Noria
f17159b029
edit pass: the names of Rails components have a space, ie, "Active Record", not "ActiveRecord"
2010-06-14 23:22:04 +02:00
Rizwan Reza
7d7d54fa1f
Revised the rest of the files from ActiveModel.
2010-06-14 13:56:51 +04:30
Evgeniy Dolzhenko
ccf9577aee
Fix a bunch of minor spelling mistakes
2010-06-11 14:15:34 +04:00
Josh Kalderimis
92160219a8
minor changes to instance level validations implementation based on feedback from José Valim
2010-05-13 13:57:37 -07:00
Xavier Noria
76f024ac8d
adds missing requires for Object#blank? and Object#present?
2010-03-28 14:15:02 +02:00
Jeremy Kemper
a98db7c6ef
Use Array.wrap uniformly
2010-03-27 11:50:11 -07:00
Prem Sichanugrist
8f97e9d19a
Add validators reflection so you can do 'Person.validators' and 'Person.validators_on(:name)'.
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-02-21 12:37:46 +01:00
Mikel Lindsaar
a07d0f8786
Full update on ActiveModel documentation
2010-02-01 10:08:20 +11:00
jamie
0a79eb7889
Add validates method as shortcut to setup validators for a given set of attributes:
...
class Person < ActiveRecord::Base
include MyValidators
validates :name, :presence => true, :uniqueness => true, :length => { :maximum => 100 }
validates :email, :presence => true, :email => true
end
[#3058 status:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-01-07 19:23:59 +01:00
José Valim
4796be33a4
Add missing tests to Validators.
2010-01-03 17:14:50 +01:00
José Valim
279067639f
validates_each uses a BlockValidator.
2009-12-23 01:38:15 +01:00
José Valim
977a5c43b1
Added check_validity! to EachValidator and refactor existing ones.
2009-12-23 01:08:27 +01:00
José Valim
f1085f4128
Move validations in ActiveModel to validators, however all validatity checks are still in the class method.
2009-12-23 00:36:51 +01:00
José Valim
2476c5312d
Validator is simply sent to validate method. However, the API needs to change, so validate accepts a record.
2009-12-22 23:12:21 +01:00
José Valim
e714b499cc
Move validator, human_name and human_attribute_name to ActiveModel, remove deprecated error messages and add i18n_scope and lookup_ancestors.
...
Signed-off-by: Carl Lerche <carllerche@mac.com>
2009-10-20 17:52:32 -07:00