| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
| |
The method got extracted out from AR::Base in commit
d916c62cfc7c59ab6411407a05b946d3dd7535e9, but the tests never did.
|
|
|
|
|
|
|
| |
base_test.rb
The method itself got extracted out from ActiveRecored::Base in commit
ceb33f84933639d3b61aac62e5e71fd087ab65ed, but the test code never did.
|
|
|
|
|
| |
The methods got moved to core.rb in commit
b2c9ce341a1c907041f55461aefebb0321280cb5, but the tests never did.
|
|
|
|
|
|
|
|
| |
0123c39f41e2062311b2197e6e230ef8ad67e20e
Due to commit 0123c39f41e2062311b2197e6e230ef8ad67e20e, column
topic.unique_replies_count has been added, and these test started to
fail since the tests depends on the topic tables column info.
|
|
|
|
|
|
| |
`AR::Base#to_param` and `AR::Base#cache_key` is defined at
active_record/integration.rb, so tests for those methods should be at
integration_test.rb
|
|
|
|
|
|
|
|
|
|
|
|
| |
Existing code was delegating to the instance with delegate
macro calls, or invoking the instance method to reach
the object and call its instance methods.
But the point is to have a clean class-level interface where
the thread local instance is hidden in the implementation.
References #11c6973.
References #10198.
|
|
|
|
| |
PerThreadRegistry module.
|
|
|
|
|
| |
current_scope and ignore_default_scope locals are brought together under
a registry object.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Introduce test on Error#full_message for attribute with underscores; Fix
some typos
|
|
|
|
| |
Type a fixo.
|
|
|
|
|
| |
These tests should be in inheritance_test.rb since its testing a
feature which is implemented in inheritance.rb
|
|
|
|
|
|
|
| |
We moved more and more away from passing options to finder / calculation
methods. The `:distinct` option in `#count` was one of the remaining places.
Since we can now combine `Relation#distinct` with `Relation#count` the option
is no longer necessary and can be deprecated.
|
|
|
|
|
|
|
|
| |
The similarity of `Relation#uniq` to `Array#uniq` is confusing. Since our
Relation API is close to SQL terms I renamed `#uniq` to `#distinct`.
There is no deprecation. `#uniq` and `#uniq!` are aliases and will continue
to work. I also updated the documentation to promote the use of `#distinct`.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
cache_key consults updated_on timestamp if present
Conflicts:
activerecord/CHANGELOG.md
|
| |
| |
| |
| |
| | |
- Extract max timestamp retrieval for cache_key
- Update changelog for cache_key changes
|
|/
|
|
|
|
|
|
|
|
| |
Calling a literal ActiveRecord::Base.new raises NoMethodError,
since it ends up calling Class.abstract_class? which does not exist.
Similarly, instantiating an actual abstract class hits the database,
when conventionally it should immediately throw NotImplementedError.
ActiveRecord::Base can't be made abstract without breaking many,
many things, so check for it separately.
|
|
|
|
|
| |
object that has not yet been persisted. This behavior follows the
precedent set by update_columns.
|
|
|
|
| |
These are duplicated with the tests which are in relations_test.rb
|
| |
|
| |
|
| |
|
|\
| |
| | |
remove meaningless AS::FrozenObjectError
|
| | |
|
|/ |
|
| |
|
|
|
|
|
| |
Conflicts:
activerecord/test/cases/base_test.rb
|
|
|
|
|
|
|
| |
This can be done using the class attribute cache_timestamp_format
Conflicts:
railties/guides/source/configuring.textile
|
|
|
|
|
|
| |
Conflicts:
activerecord/test/models/bulb.rb
activerecord/test/schema/schema.rb
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
In the end I think the pain of implementing this seamlessly was not
worth the gain provided.
The intention was that it would allow plain ruby objects that might not
live in your main application to be subclassed and have persistence
mixed in. But I've decided that the benefit of doing that is not worth
the amount of complexity that the implementation introduced.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Due to its lack of thread safety, we're deprecating this, and it
will be removed in Rails 4.1.
Fixes #4060.
|
|
|
|
|
|
| |
The string_to_dummy_time method was blindly parsing the dummy time string
with Date._parse which returns a hash for the date part regardless
of whether the time part is an invalid time string.
|
|
|
|
|
| |
All tests with a custom inheritance_column use the `Vegtable` model.
The field ruby_type on the Company models is no longer needed
|
|
|
|
|
|
|
|
| |
This test https://github.com/rails/rails/blob/master/activerecord/test/cases/base_test.rb#L381
is failing because is not setting `CreditCard.pluralize_table_name` to `false`.
In this case, i prefer to change to another model that is not in the `GUESSED_CLASSES`
array.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
ActiveRecord::ConnectionAdapters::Column#microseconds did an unnecessary
conversion to from Rational to float when calculating the integer number
of microseconds. Some terminating decimal numbers in base10 are
repeating decimal numbers in base2 (the format of float), and
occasionally this causes a rounding error.
Patch & explanation originally from Logan Bowers.
|