Rafael Mendonça França
8781b266b9
Sync CHANGELOGs [ci skip]
2012-08-11 13:13:58 -03:00
Bert Goethals
920d9ee4d8
Naming helpers should first check if passed object responds to model_name
2012-08-08 22:40:06 +02:00
Xavier Noria
447b6a4e67
removes usage of Object#in? from the code base (the method remains defined by Active Support)
...
Selecting which key extensions to include in active_support/rails
made apparent the systematic usage of Object#in? in the code base.
After some discussion in
5ea6b0df9a
we decided to remove it and use plain Ruby, which seems enough
for this particular idiom.
In this commit the refactor has been made case by case. Sometimes
include? is the natural alternative, others a simple || is the
way you actually spell the condition in your head, others a case
statement seems more appropriate. I have chosen the one I liked
the most in each case.
2012-08-06 00:30:02 +02:00
Vijay Dev
3d3fa165e4
Merge branch 'master' of github.com:lifo/docrails
...
Conflicts:
activemodel/lib/active_model/secure_password.rb
activerecord/lib/active_record/associations/collection_proxy.rb
2012-08-04 15:18:35 +05:30
Vijay Dev
b51201242a
copy edits [ci skip]
2012-08-04 15:09:33 +05:30
Rafael Mendonça França
9895f6ca2b
Merge pull request #7253 from acapilleri/lenght_validator_errors_options
...
calculate errors_options one time in validate_each
2012-08-03 09:57:37 -07:00
Angelo Capilleri
93b6fafe3c
calculate errors_options one time in validate_each
...
errors_options is calculated for every *CHECKS* but it could be
calculated one time because options and RESERVED_OPTIONS
not change during this cycle
2012-08-03 17:42:38 +02:00
Jon Leighton
55b24888bb
Remove ActiveRecord::Base.to_a
...
On reflection, it seems like a bit of a weird method to have on
ActiveRecord::Base, and it shouldn't be needed most of the time anyway.
2012-08-03 11:51:52 +01:00
Robert Pankowecki
ad9b6a3f94
Fix ActiveModel::Serializers::Xml#to_xml reference
...
Link to ActiveRecord::Serialization#to_xml for more details
2012-08-02 23:47:02 +02:00
Xavier Noria
077372b20d
load active_support/deprecation in active_support/rails
2012-08-02 21:59:23 +02:00
Xavier Noria
4aee8dd486
load active_support/core_ext/module/delegation in active_support/rails
2012-08-02 21:59:23 +02:00
Xavier Noria
5e1b92044c
load active_support/core_ext/class/attribute in active_support/rails
2012-08-02 21:59:23 +02:00
Xavier Noria
64bc8447c2
load active_support/concern in active_support/rails
2012-08-02 21:59:23 +02:00
Xavier Noria
5ea6b0df9a
load active_support/core_ext/object/inclusion in active_support/rails
2012-08-02 21:59:22 +02:00
Xavier Noria
8f58d6e507
load active_support/core_ext/object/blank in active_support/rails
2012-08-02 21:59:22 +02:00
Xavier Noria
1a7b2e8fad
defines a private require-hub active_support/rails
...
This is a private place to put those AS features that are used
by every component. Nowadays we cherry-pick individual files
wherever they are used, but that it is not worth the effort
for stuff that is going to be loaded for sure sooner or later,
like blank?, autoload, concern, etc.
2012-08-02 21:59:22 +02:00
Robby Grossman
ad7f9cdf00
has_secure_password should not raise a 'digest missing' error if the calling class has specified for validations to be skipped.
2012-07-31 16:16:21 -04:00
Francesco Rodriguez
7b7501b2e5
update ActiveModel::Observer documentation [ci skip]
2012-07-31 11:46:13 -05:00
Francesco Rodriguez
ab53cc7b2e
update ActiveModel::ObserverArray documentation [ci skip]
2012-07-30 23:32:48 -05:00
Francesco Rodriguez
1d537fdc47
add :nodoc: to ActiveModel::Observing#inherited [ci skip]
2012-07-30 23:19:15 -05:00
Francesco Rodriguez
cb15fe55da
update ActiveModel::Observing documentation [ci skip]
2012-07-30 23:15:27 -05:00
Francesco Rodriguez
d67b289796
update ActiveModel::Serializers documentation [ci skip]
2012-07-30 21:34:03 -05:00
Francesco Rodriguez
4ff5a5df4d
add documentation to ActiveModel #from_json method [ci skip]
2012-07-30 21:34:03 -05:00
Francesco Rodriguez
1ca957c5bb
fix #after_validation example [ci skip]
2012-07-30 10:55:06 -05:00
Francesco Rodriguez
4d1794713e
add :nodoc: directives to ActiveModel Sanitizers [ci skip]
2012-07-29 23:09:24 -05:00
Francesco Rodriguez
c57b8d236b
fix class reference in AM::MassAssignmentSecurity documentation [ci skip]
2012-07-29 22:56:04 -05:00
Francesco Rodriguez
cb6c3e28af
update ActiveModel::Validations::Callbacks documentation [ci skip]
2012-07-29 22:40:37 -05:00
Francesco Rodriguez
097bfc8296
update #validates and #validates! documentation [ci skip]
2012-07-29 20:08:42 -05:00
Francesco Rodriguez
0557273f38
update ActiveModel::Valdations#validates_with docs [ci skip]
2012-07-29 19:57:48 -05:00
Francesco Rodriguez
01e61eed6a
update ActiveModel::Validations docs [ci skip]
2012-07-29 19:52:25 -05:00
Francesco Rodriguez
78502673ac
update ActiveModel::Validator docs [ci skip]
2012-07-29 13:35:33 -05:00
Francesco Rodriguez
f0f7786aab
update ActiveModel::SecurePassword docs [ci skip]
2012-07-29 12:04:43 -05:00
Francesco Rodriguez
79b8778721
add example to ActiveModel::StrictValidationFailed [ci skip]
2012-07-28 14:24:56 -05:00
Francesco Rodriguez
b8672914b7
add example to ActiveModel::MissingAttributeError [ci skip]
2012-07-28 01:19:38 -05:00
Francesco Rodriguez
ac18d642e9
update ActiveModel::MassAssignmentSecurity docs [ci skip]
2012-07-28 00:58:21 -05:00
Francesco Rodriguez
b8e4f7155b
add example to ActiveModel::Naming#model_name [ci skip]
2012-07-27 23:38:34 -05:00
Francesco Rodriguez
36ebafdce9
fix AM::Naming examples [ci skip]
2012-07-27 23:16:51 -05:00
Jon Leighton
6a81ccd69d
ActiveRecord::Base.all returns a Relation.
...
Previously it returned an Array.
If you want an array, call e.g. `Post.to_a` rather than `Post.all`. This
is more explicit.
In most cases this should not break existing code, since
Relations use method_missing to delegate unknown methods to #to_a
anyway.
2012-07-27 13:34:12 +01:00
Accessd
f35f6ab003
fix typo in callbacks test
2012-07-24 12:01:41 +04:00
Francesco Rodriguez
b7b97fadc1
add :nodoc: directive to AM::ObserverArray internal methods [ci skip]
2012-07-22 13:26:43 -05:00
Rafael Mendonça França
a63f7a1364
Update documentation and change the range method name to delimiter.
2012-07-20 14:23:05 -03:00
Rafael Mendonça França
770fa81bba
Don't pass :within
option to the i18n
2012-07-20 14:10:25 -03:00
Rafael Mendonça França
53edd32684
validates_inclusion_of
and validates_exclusion_of
now accept
...
`:within` option as alias of `:in` as documented.
Fix #7118
2012-07-20 13:53:31 -03:00
Bogdan Gusiev
c175563b88
AM::Validations: remove documentation duplicates
2012-07-10 10:07:38 +03:00
Vijay Dev
ee20be7c33
Merge branch 'master' of github.com:lifo/docrails
2012-07-07 20:44:49 +05:30
Carlos Antonio da Silva
d4f59783d2
Merge pull request #6938 from acapilleri/as_json_refactoring
...
Small refactoring of as_json method
2012-07-07 06:39:56 -07:00
Francesco Rodriguez
ca802fda66
add :nodoc: to internal implementations of AM::Validator [ci skip]
2012-07-06 00:17:13 -05:00
Francesco Rodriguez
9a7702a1df
update ActiveModel::Serialization documentation [ci skip]
2012-07-06 00:09:08 -05:00
Francesco Rodriguez
70c4676d88
fix syntax of AM::Validations::HelperMethods examples [ci skip]
2012-07-05 11:19:20 -05:00
Francesco Rodriguez
68df230255
update ActiveModel::Validations::HelperMethods documentation [ci skip]
2012-07-05 00:09:29 -05:00