| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
because of an ambiguous column name. This happened if the association
model had a default scope that referenced a third table, and the third
table also referenced the original table (with an identical
foreign_key).
Mysql requires that ambiguous columns are deambiguated by using the full
table.column syntax. Postgresql and Sqlite use a different syntax for
updates altogether (and don't tolerate table.name syntax), so the fix
requires always including the full table.column and discarding it later
for Sqlite and Postgresql.
|
| |
| |
| |
| |
| |
| |
| |
| | |
`Kernel.quietly` silences `STDOUT` and `STDERR`, which is useless if
the logger is writing to a file, while `AS::Logger#silence` swaps the
logger level to `ERROR`.
Related to #8820 and #8052.
|
| |
| |
| |
| |
| |
| | |
With the addition of String#in_time_zone and Date#in_time_zone
we can simplify the type casting code by checking if the value
has an `in_time_zone` method.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, when `time_zone_aware_attributes` were enabled, after
changing a datetime or timestamp attribute and then changing it back
to the original value, `changed_attributes` still tracked the
attribute as changed. This caused `[attribute]_changed?` and
`changed?` methods to return true incorrectly.
Example:
in_time_zone 'Paris' do
order = Order.new
original_time = Time.local(2012, 10, 10)
order.shipped_at = original_time
order.save
order.changed? # => false
# changing value
order.shipped_at = Time.local(2013, 1, 1)
order.changed? # => true
# reverting to original value
order.shipped_at = original_time
order.changed? # => false, used to return true
end
|
|\ \
| | |
| | |
| | |
| | |
| | | |
Conflicts:
actionpack/lib/action_view/helpers/form_options_helper.rb
guides/code/getting_started/app/controllers/comments_controller.rb
|
| | | |
|
| | |
| | |
| | |
| | | |
I think that these signs are probably mistake.
|
| | | |
|
| | |
| | |
| | |
| | | |
closes #6865
|
| | |
| | |
| | |
| | | |
https://github.com/rails/rails/commit/4beb4dececcf10c642c74fbcb8548c833e921a86#commitcomment-2482869
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
or the ConnectionPool silently fails to close connections inside the Thread
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit 4e05bfb8e254c3360a3ca4a6cb332995314338fe.
Reason: BlankTopic#blank? should not be removed to check that dynamic finder with a bang can find a model that responds to `blank?`
|
| | | |
|
| | |
| | |
| | |
| | | |
this would give us some more clues in case a test silently dies inside Thread
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Travis only has PostgreSQL 9.1.x but 9.2 is required for range datatypes.
|
|\ \ \
| | | |
| | | | |
Postgresql range support
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The native JSON library bypasses the `to_json` overrides in
active_support/core_ext/object/to_json.rb by calling its native
implementation directly. However `ActiveRecord::Store` uses a
HWIA so `JSON.dump` will call our `to_json` instead with a
`State` object for options rather than a `Hash`. This generates
a warning when the `:encoding`, `:only` & `:except` keys are
accessed in `Hash#as_json` because the `State` object delegates
unknown keys to `instance_variable_get` in its `:[]` method.
Workaround this warning in the test by using a custom coder that
calls `ActiveSupport::JSON.encode` directly.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit e9d2ad395ec2ef929d74752f3d71c80674044fbe.
Closes #8460
Conflicts:
activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb
activerecord/test/cases/dirty_test.rb
|
| | |
| | |
| | |
| | | |
Add a test case to ensure that fractional second updates are detected.
|
| | |
| | |
| | |
| | | |
[ci skip]
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
because some tests were not resetting them, and thus the tests were order dependent
|
| | | |
|
| | |
| | |
| | |
| | | |
new transaction state object upon initialization.
|
| | |
| | |
| | |
| | | |
Cleanup change_schema tests to remove extra sorts on columns.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
seejee/regression_test_for_chained_preloaded_scopes
Added test case to prevent regression of chained, preloaded scopes.
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Added a new rake task in activerecord
|
| | | | |
| | | | |
| | | | |
| | | | | |
postgresql:drop_databases
|
|\ \ \ \ \
| | |_|_|/
| |/| | | |
Created state for a transaction and added tests.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | |/ / /
| |/| | | |
added a db create rake task.
|