| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
| |
| |
| |
| | |
- Test case for https://github.com/rails/rails/pull/16851
|
| | |
|
| |
| |
| |
| |
| | |
- Improve the error message by suggesting that the user may have
intended to call validates instead of validate method.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Goals:
1. Default to :random for newly generated applications
2. Default to :sorted for existing applications with a warning
3. Only show the warning once
4. Only show the warning if the app actually uses AS::TestCase
Fixes #16769
|
| |
| |
| |
| |
| | |
This reverts commits e969c928463e329fd6529ac59cad96385c538ffb and
bd2b3fbe54e750ba97469a7896e8d143d6dfd465.
|
| |
| |
| |
| |
| |
| | |
This documentation should be in the guides.
Closes #16691
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We're seeing too many failures to believe otherwise.
This reverts commits bc116a55ca3dd9f63a1f1ca7ade3623885adcc57,
cbde413df3839e06dd14e3c220e9800af91e83ab,
bf0a67931dd8e58f6f878b9510ae818ae1f29a3a, and
2440933fe2c27b27bcafcd9019717800db2641aa.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When we are loading a component and we want to know its version, we are
actually not speaking about the constant but the library itself.
[ci skip]
[Godfrey Chan & Xavier Noria]
|
|\ \ |
|
| | | |
|
| | |
| | |
| | |
| | | |
Dir.glob result must be already sorted anyway
|
| |\ \
| | | |
| | | | |
Update documentation to match change in #5942 [ci skip]
|
| | | | |
|
| |\ \ \
| | | | |
| | | | | |
[ci skip] make assert messages consistent
|
| | |/ / |
|
| |/ / |
|
| | |
| | |
| | |
| | |
| | | |
This way no new object allocation is taking place. Thanks @jeremy for
the suggestion!
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The functionality has not changed, but the code is more elegant by
using `reduce` instead of `each`.
This way no accumulator needs to be declared, no explicit return is
needed.
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the request parameters are passed to create_with and where they can
be used to do mass assignment when used in combination with
Relation#create.
Fixes CVE-2014-3514
Conflicts:
activerecord/lib/active_record/relation/query_methods.rb
|
| | |
|
|\ \
| | |
| | |
| | | |
Use #model_name on instances instead of classes
|
| | |
| | |
| | |
| | |
| | |
| | | |
This allows rails code to be more confdent when asking for a model name, instead of having to ask for the class.
Rails core discussion here: https://groups.google.com/forum/#!topic/rubyonrails-core/ThSaXw9y1F8
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
WARNING: don't use them! They might change or go away between future beta/RC/
patch releases!
Also added a CHANGELOG entry for this.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Calling ActiveSupport::TestCase.i_suck_and_my_tests_are_order_dependent! in AS::TestCase makes
everyone's tests order dependent, which should never be done by the framework.
|
| | | |
|
| |/
|/| |
|
| | |
|
|\ \
| | |
| | | |
remove unneeded test model for ActiveModel test cases.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
We have to specify the `:title` option to really use the
`TitleValidator` defined above.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
Conflicts:
actionpack/test/abstract_unit.rb
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We are planning to remove mocha from our test suite because of
performance problems. To make this possible we should stop require mocha
on ActionSupport::TestCase.
This should not affect applications since users still need to add mocha
to Gemfile and this already load mocha.
Added FIXME notes to place that still need mocha removal
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
Check for valid options in validate method
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This change prevents a certain class of user error which results when
mistakenly using the `validate` class method instead of the `validates`
class method.
Only apply when all arguments are symbols, because some validations use
the `validate` method and pass in additional options, namely the
`LenghValidator` via the `ActiveMode::Validations::validates_with`
method.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Also make it accept a list of attributes to be changed. This will make
possible to restore only a subset of the changed attributes.
Closes #16203
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
These methods may cause confusion with the `reset_changes` that
behaves differently
of them.
Also rename undo_changes to restore_changes to match this new set of
methods.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
#clear_changes_information
This method name is causing confusion with the `reset_#{attribute}`
methods. While `reset_name` set the value of the name attribute for the
previous value the `reset_changes` only discard the changes and previous
changes.
|
|/ / / |
|
| | |
| | |
| | |
| | | |
This is a follow up to #16024.
|
| | |
| | |
| | |
| | | |
ActiveModel::SecurePassword
|
| | |
| | |
| | |
| | |
| | | |
The instance method `model_name` was being defined multiple times,
causing a redefinition warning.
|
| | |
| | |
| | |
| | | |
To avoid overload with database rollback
|