| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Users should pass strings to queries instead of classes
|
|\
| |
| | |
Prevent Symbol GC
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This `# :nodoc:` had the effect of hiding every method that follows.
This meant that the API page for `ActiveRecord::Core` only contained
`configurations` and none of the following methods.
Furthermore this `# :nodoc:` had no effect on `maintain_test_schema`.
Those `mattr_accessor` inside the `included` block are not picked up
by rdoc.
/cc @zzak
|
|/
|
|
| |
key, not just integer ones, as per @a58cafeb3a86be46849de57481b6644094fb8165
|
|\
| |
| | |
Move PredicateBuilder instantiation to constructor
|
| |
| |
| |
| | |
In order to maintain thread safety and prevent race condition from memoization.
|
| |
| |
| |
| | |
[ci skp]
|
| | |
|
|\ \
| |/
|/|
| |
| |
| | |
CLUSTERfoo/fix/adding_timestamps_migration_not_reversible
Failure to rollback t.timestamps when within a change_table migration
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When running the following migration:
change_table(:table_name) { |t| t/timestamps }
The following error was produced:
wrong number of arguments (2 for 1) .... /connection_adapters/abstract/schema_statements.rb:851:in `remove_timestamps'
This is due to `arguments` containing an empty hash as its second
argument.
|
|/
|
|
|
|
|
|
| |
[ci skip]
This is due to the fact that `.delete` is directly translated to SQL.
It tries to follow the same rules as `.delete_all` which is not able
to verify that records are `#readonly?`.
|
| |
|
|\
| |
| | |
remove useless methods
|
| | |
|
|\ \
| |/
|/| |
Fix "nonexistent" typo in tests
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
This ensures that we're handling all forms of nested tables the same way.
We're aware that the `convert_dot_notation_to_hash` method will cause a
performance hit, and we intend to come back to it once we've refactored some of
the surrounding code.
[Melissa Xie & Melanie Gilman]
|
|\
| |
| | |
Refactor `PredicateBuilder` from singleton to instance
|
| | |
|
|/
|
|
|
|
| |
This commit fixes the following case.
User.where(User.arel_table[:created_at].lteq(1.year.ago)).unscope(where :created_at)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This is a follow up to https://github.com/rails/rails/commit/07786c5e75a7b0afdf318063510af6b475e3e04c
and https://github.com/rails/rails/commit/cd2596f55e88fe659592612a793c4f4aa723c9be
|
| |
|
| |
|
|
|
|
| |
Fixes: https://github.com/rails/rails/issues/17856.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The detection of in-place changes caused a weird unexpected issue with
numericality validations. That validator (out of necessity) works on the
`_before_type_cast` version of the attribute, since on an `:integer`
type column, a non-numeric string would type cast to 0.
However, strings are mutable, and we changed strings to ensure that the
post type cast version of the attribute was a different instance than
the before type cast version (so the mutation detection can work
properly).
Even though strings are the only mutable type for which a numericality
validation makes sense, special casing strings would feel like a strange
change to make here. Instead, we can make the assumption that for all
mutable types, we should work on the post-type-cast version of the
attribute, since all cases which would return 0 for non-numeric strings
are immutable.
Fixes #17852
|
|
|
|
| |
[ci skip]
|
|
|
|
|
| |
`where_sql` now requires that we pass it an engine. None of the manager
classes take an engine in their constructor.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We never actually make use of it on the table, since we're constructing
the select manager manually. It looks like if we ever actually were
grabbing it from the table, we're grossly misusing it since it's meant
to vary by AR class.
Its existence on `Arel::Table` appears to be purely for convenience
methods that are never used outside of tests. However, in production
code it just complicates construction of the tables on the rails side,
and the plan is to remove it from `Arel::Table` entirely. I'm not
convinced it needs to live on `SelectManager`, etc either.
|
| |
|
|
|
|
|
|
|
|
|
| |
[This article](http://weblog.rubyonrails.org/2014/8/20/Rails-4-2-beta1/#maintenance-consequences-and-rails-5-0) states that:
> Rails 5.0 is in most likelihood going to target Ruby 2.2.
Before the exact minimum version is fully decided, @arthurnn [suggests](https://github.com/rails/rails/pull/17830#issuecomment-64940383)
that **at least** version 2.1.0 **must** be required by the `gemspec` files.
|
|\
| |
| | |
Refactor `add_column_options!`, to move the quoting of default value for :uuid in `quote_value`.
|
| | |
|
| |
| |
| |
| | |
:uuid in `quote_value`.
|
| |
| |
| |
| |
| |
| |
| | |
We will support only Ruby >= 2.1.
But right now we don't accept pull requests with syntax changes to drop
support to Ruby 1.9.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes a regression where preloading association throws an
exception if one of the associations in the preloading hash doesn't
exist for one record.
Fixes #16070
|
|\ \
| | |
| | |
| | |
| | | |
yuki24/fix-bug-where-record-not-saved-loses-error-message
Fixed a bug where AR::RecordNotSaved loses the given error message
|
| |/
| |
| |
| |
| |
| | |
Since 3e30c5d, it started ignoring the given error message. This commit
changes the behavior of AR::RecordNotSaved#initialize so that it no
longer loses the given error message.
|
|\ \
| |/
|/| |
Refactor `SchemaCreation#visit_AddColumn`
|
| | |
|
|\ \
| | |
| | | |
Correct test description for large integer test
|