| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| | |
integer calling #to_i
|
| |
| |
| |
| |
| |
| | |
Fix for time type columns with invalid time value
Conflicts:
activerecord/CHANGELOG.md
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I had to create a new table because I needed an STI table,
which does not have both a "type" and a "custom_type"
the test fails with:
1) Error:
test_alt_becomes_works_with_sti(InheritanceTest):
NoMethodError: undefined method `type=' for #<Cabbage id: 1, name: "my cucumber", custom_type: "Cucumber">
/Users/username/Projects/rails/activemodel/lib/active_model/attribute_methods.rb:432:in `method_missing'
/Users/username/Projects/rails/activerecord/lib/active_record/attribute_methods.rb:100:in `method_missing'
/Users/username/Projects/rails/activerecord/lib/active_record/persistence.rb:165:in `becomes'
test/cases/inheritance_test.rb:134:in `test_becomes_works_with_sti'
test/cases/inheritance_test.rb:140:in `test_alt_becomes_works_with_sti'
Conflicts:
activerecord/test/cases/inheritance_test.rb
|
| |
|
|
|
|
|
|
|
|
| |
conditions
Conflicts:
activerecord/test/models/reader.rb
|
|
|
|
|
|
|
|
| |
Fix for #5200
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/counter_cache.rb
|
|
|
|
|
|
|
| |
Fix #6975. Round usec when writing timestamp attribute.
Conflicts:
activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb
|
|
|
|
|
|
|
|
|
|
|
| |
brainopia/use_inversed_parent_for_first_and_last_child
Use inversed parent for first and last child of has_many association
[Backport] Closes #3223.
Conflicts:
activerecord/lib/active_record/associations/collection_association.rb
|
|\
| |
| |
| |
| | |
ManageIQ/fix_table_remove_passing_array_deprecation
Table#remove passed an array to remove_column, which is deprecated.
|
| |
| |
| |
| | |
See 02ca9151a043a4fefbb3f22edd05f0cd392fffaa
|
|/
|
|
| |
Use round to get the right conversion
|
|
|
|
|
|
| |
Fix occasional microsecond conversion inaccuracy
Conflicts:
activerecord/CHANGELOG.md
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revert "Deprecate update_attribute."
This reverts commit b081f6b59fb3f15d12043072ad9b331ffd2bc56e.
Reason: Since the new deprecation policy we removed the deprecation of
update_attribute but we didn't reverted the changes to use
update_column.
Fixes #7306
|
|
|
|
|
|
| |
Restore state on create when ActiveRecord::RecordInvalid is raised
Conflicts:
activerecord/CHANGELOG.md
|
|
|
|
|
|
| |
Fix #7191. Remove unnecessary transaction when assigning has_one associations.
Conflicts:
activerecord/test/cases/associations/has_one_associations_test.rb
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| | |
`Rails.env` already use development if ENV["RAILS_ENV"] is not present.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
zero and the new value is not a string.
Before this commit this was the behavior
r = Review.find_by_issue(0)
r.issue
=> 0
r.changes
=> {}
r.issue = 0
=> 0
r.changed?
=> true
r.changes
=> {"issue"=>[0,0]}
Fixes #7237
|
| | |
|
| |
| |
| |
| |
| |
| | |
Remove prepared statement from system query in postgresql adapter
Conflicts:
activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
|
| |
| |
| |
| |
| |
| |
| | |
Missed extend for eager_autoload
This backport is trying to fix a bug with eager load
ActiveRecord::Associations modules
|
| |
| |
| |
| |
| |
| |
| |
| | |
Make sure :environment task is executed before db:schema:load or
db:structure:load
Conflicts:
activerecord/CHANGELOG.md
|
| |
| |
| |
| | |
`Rails.env` already use development if ENV["RAILS_ENV"] is not present.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
zero and the new value is not a string.
Before this commit this was the behavior
r = Review.find_by_issue(0)
r.issue
=> 0
r.changes
=> {}
r.issue = 0
=> 0
r.changed?
=> true
r.changes
=> {"issue"=>[0,0]}
Fixes #7237
|
|/
|
|
| |
postgresql_adapter.rb while creating distincts.
|
| |
|
|
|
|
| |
Applying the new policy here to not deprecate stuff in point releases.
|
|
|
|
|
|
|
| |
We have decided not to drop this important method in 4.0 and give
it a longer deprecation cycle. On the other hand we do not expect
to have update_column around for a long time, it is going to be
replaced in favor of update_columns.
|
|
|
|
| |
This reverts commit 44b313bc4e3762da64dde7894548f81c595147de.
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit a79bfa92e7bdc31b346d13ee5447d3fdac382bfb.
Conflicts:
activerecord/CHANGELOG.md
We shouldn't introducing deprecations in point releases.
It will be deprecated in 4.0 instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of update_column"
This reverts commit 9fa06c3d9811113259cb6e00a3a8454b3974add7.
This reverts commit 17a64de4980683da3ca3c185205013a29a8cf88d.
This reverts commit def9c85ffbdcf63e6c412b6bd4abafaa32ccdb5c, reversing
changes made to 6b7d26cf3c061907aedc44f7f36776c9b36950fd.
Reason: This was supposed to be released with 3.2.7 before the
suggestion to use update_column. Since it was not release now is not
good to suggest to use another method because it will confusing the
people.
|
|
|
|
|
| |
See the comment in the file activerecord/lib/active_record.rb
added by this patch for the rationale.
|
|
|
|
|
|
|
|
| |
This require makes the dependency even more clear.
In particular we are eager loading the session
store but that does not work if AR is used
outside Rails, this patch is preliminary work
in fixing #7160.
|
|
|
|
|
|
|
|
|
|
| |
`:rails_env` tasks is not needed in all the tasks that depends of
`load_config`, only in the tasks that uses `Rails.env`.
Since `:rails_env` task set the `Rails.env` to be "development" if it is
not set we don't need the `||` statements too
Fix #7175.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 3-2-rel:
updating release date
bumping to 3.2.7
updating the changelog
* Do not convert digest auth strings to symbols. CVE-2012-3424
updating the version
updating changelogs
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
update_column is deprecated in Rails 4.0 so it makes no sense to
recommend adopting it only to require changing to update_columns
in the very next release.
|
|/ |
|
| |
|
|
|
|
|
|
| |
Integration's definition of #to_param must override
Conversion's. Otherwise, there is a regression from
3.1 in the behavior of a non-persisted AR::Base instance
which nevertheless has an id.
|
|
|
|
| |
Fix GH #4259. When we execute schema dumper, we must remove table_name_prefix and table_name_suffix.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prepared statements (prepare/execute/close) were being used unnecessarily
when no bind variables were present, and disabling prepared statement using
prepared_statements:false was principally broken. While bind variables were
correctly substituted with prepared_statements:false, the prepared statement
interface was still used, costing an extra two round trips per query.
In addition to making this behavioral change, I also cleaned up the internals
of exec_stmt and exec_without_stmt so that they behave the same (calling log
and constructing the ActiveRecord::Result in the same way).
Moving the check for binds.empty? to exec_query also will mean that several
code paths explicitly calling exec_without_stmt could be cleaned up to once
again call exec_query instead. I have also left the check for binds.empty? in
exec_stmt, since it is not a private method and could be called directly with
an empty binds array. For the sake of clarity in this patch, I have not made
those changes.
= The previous behavior =
When issuing a Foo.find(1) with prepared_statements:true, the bind variable
is present in the prepared query, and execute shows a value passed:
Connect root@localhost on rails_test
Query SET SQL_AUTO_IS_NULL=0
Statistics
Query SHOW FULL FIELDS FROM `foos`
Query SHOW TABLES LIKE 'foos'
Query SHOW CREATE TABLE `foos`
Prepare SELECT `foos`.* FROM `foos` WHERE `foos`.`id` = ? LIMIT 1
Execute SELECT `foos`.* FROM `foos` WHERE `foos`.`id` = 1 LIMIT 1
Close stmt
Quit
When issuing a Foo.find(1) with prepared_statements:false, the bind variable
has already been removed and substituted with the value, but the prepared
statement interface is used anyway:
Connect root@localhost on rails_test
Query SET SQL_AUTO_IS_NULL=0
Statistics
Query SHOW FULL FIELDS FROM `foos`
Query SHOW TABLES LIKE 'foos'
Query SHOW CREATE TABLE `foos`
Prepare SELECT `foos`.* FROM `foos` WHERE `foos`.`id` = 1 LIMIT 1
Execute SELECT `foos`.* FROM `foos` WHERE `foos`.`id` = 1 LIMIT 1
Close stmt
Quit
= With this patch applied =
When issuing a Foo.find(1) with prepared_statements:true, the bind variable
is present in the prepared query, and execute shows a value passed:
Connect root@localhost on rails_test
Query SET SQL_AUTO_IS_NULL=0
Statistics
Query SHOW FULL FIELDS FROM `foos`
Query SHOW TABLES LIKE 'foos'
Query SHOW CREATE TABLE `foos`
Prepare SELECT `foos`.* FROM `foos` WHERE `foos`.`id` = ? LIMIT 1
Execute SELECT `foos`.* FROM `foos` WHERE `foos`.`id` = 1 LIMIT 1
Close stmt
Quit
When issuing a Foo.find(1) with prepared_statements:false, the bind variable
has been removed and substituted with the value, and the query interface is
used instead of the prepared statement interface:
Connect root@localhost on rails_test
Query SET SQL_AUTO_IS_NULL=0
Statistics
Query SHOW FULL FIELDS FROM `foos`
Query SHOW TABLES LIKE 'foos'
Query SHOW CREATE TABLE `foos`
Query SELECT `foos`.* FROM `foos` WHERE `foos`.`id` = 1 LIMIT 1
Quit
|
| |
|
|
|
|
|
|
| |
Disable query cache for lock queries
Conflicts:
activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
|
|
|
|
|
|
|
| |
Fix bug with autosave collection association on new record with a marked
for destroy record in autosave collection.
Fixes #6918.
|
|
|
|
|
|
| |
fix bug in limit of enum columns of mysql
Closes #6432
|