| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Make `#prepend` method modify instance in-place and return self
instead of just returning modified value. That is exactly what
`#prepend!` method was doing previously, so it's deprecated from
now on.
|
|\
| |
| | |
append link to bad code when error type is SyntaxError
|
| | |
|
|\ \
| | |
| | |
| | | |
Fix tests not unsubscribing from Notifications.
|
| | |
| | |
| | |
| | | |
See https://github.com/rails/rails/blob/master/activesupport/lib/active_support/notifications.rb#L131
|
|\ \ \
| | | |
| | | | |
Ensure we are returning either `true` or `false` for `#==`
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
460eb83d cused `ActiveRecord::Base#==` to sometimes return `nil` in some cases,
this ensures we always return a boolean value. Also fixed a similar problem in
AR reflections.
|
|\ \ \ \
| |/ / /
|/| | | |
|
| | | | |
|
| | | |
| | | |
| | | | |
[ci skip]
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
THe match documentation doesn't mention any requirement of the
parameter name requirement for matches. However, including a
bare glob character without a variable assignment causes a
parse error.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The group method also takes an array, however this isn't immediately
clear by reading the source since it delegates this method. If you
trace it back to the AREL building you can see that it does support
an array.
Shoutout to @betovelandia for pointing this out.
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |_|/ /
|/| | | |
Replace trivial regexp with string or include, twice as fast
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
HashWithIndifferentAccess#update respects #to_hash
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In particular, `.new`, `#update`, `#merge`, `#replace` all accept
objects which respond to `#to_hash`, even if those objects are not
Hashes directly.
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
Don't load test env by default.
Closes #13241
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix warning for overshadowing XML variable
|
|/ / / / / |
|
| | | | | |
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
Pass a base relation to build_default_scope when joining
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This allows the default scope to be built using the current table alias.
Resolves #12770
|
| | | | |
| | | | |
| | | | |
| | | | | |
Swap Timestamp/Callbacks order in ActiveRecord::Base
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Adds explanation of :base attribute to errors.add [ci skip]
|
|/ / / / /
| | | | |
| | | | | |
[ci skip]
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
AR .persisted? throws SystemStackError for an unsaved model with a
custom primary_key that didn't save due to validation error
|
|/ / / / /
| | | | |
| | | | |
| | | | | |
custom primary_key that didn't save due to validation error
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | | |
ActiveRecord/ActiveModel '#validate' alias for 'valid?'
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
It's unintuitive to call '#valid?' when you want to run validations but
don't care about the return value.
The alias in ActiveRecord isn't strictly necessary (the ActiveModel
alias is still in effect), but it clarifies.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When the tests are executed in order, the dependency is loaded at the right time.
However this makes it impossible to execute a single test later down the line.
Let's require the dependecy at the beginning to get them working independent of the order.
This resolves the following error:
```
$ ARCONN=postgresql ruby -Itest /Users/senny/Projects/rails/activerecord/test/cases/xml_serialization_test.rb -n test_to_xml
Using postgresql
Run options: -n test_to_xml --seed 51819
E
Finished in 0.081320s, 12.2971 runs/s, 0.0000 assertions/s.
1) Error:
DatabaseConnectedXmlSerializationTest#test_to_xml:
NameError: uninitialized constant DatabaseConnectedXmlSerializationTest::REXML
/Users/senny/Projects/rails/activerecord/test/cases/xml_serialization_test.rb:226:in `test_to_xml'
```
/cc @tgxworld fyi
|
| | | | |
| | | | |
| | | | |
| | | | | |
This will keep the test suite passing with older PG installations.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Add a test case for save(validate: false) with invalid foreign key.
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | | |
It is supposed to raise ActiveRecord::InvalidForeignKey when the
database has a fk constraint.
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This method is not being called anywhere in our code and a GitHub search
show it is not being used in any project.
|
|\ \ \ \ \
| |_|_|_|/
|/| | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* cache `o.name` value
* Avoid extra `concat` call
* Avoid extra `<<` call
|