| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We have `connection_adapters/column.rb` so it's easier to remember
that the column in in a separate file.
|
|\ \ \ \
| | | | |
| | | | | |
Tiny doc fix for Strong Parameters
|
|/ / / /
| | | |
| | | | |
- accepts_nested_attribute_for -> accepts_nested_attributes_for
|
|\ \ \ \
| |_|/ /
|/| | | |
remove calls to sql_type on pg columns
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
fixes #10613
|
|\ \ \ \
| |/ / /
|/| | | |
Require yaml explicitly on #database_configuration
|
| | |/
| |/| |
|
| |/
|/|
| |
| | |
It is already called inside type_to_sql method.
|
|\ \
| |/
|/| |
Refactor test to use DdlHelper.
|
|/
|
|
|
|
|
| |
Follow-Up to https://github.com/rails/rails/pull/14400
This ensures that all tables are removed after each test and thereby
allowing us to run the tests in a random order.
|
|\
| |
| | |
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.
|