Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix uniqueness validator with `allow_nil: false` also for mysql | Piotr Sarnacki | 2012-05-19 | 1 | -1/+1 |
| | | | | | MySQL's adapter was changing value for case sensitive comparison. We don't need to do it for `nil`. | ||||
* | Fix `validates_uniqueness_off :field, :allow_nil => false` | Piotr Sarnacki | 2012-05-19 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | | | | Closes (#5853) Uniqueness validator was not properly checking if there are any existing records, when value was `nil` and column was text type. `nil` was converted to string, which resulted in queries looking like: ```sql SELECT 1 FROM "posts" WHERE "posts"."title" = '' LIMIT 1 ``` instead of ```sql SELECT 1 FROM "posts" WHERE "posts"."title" IS NULL LIMIT 1 ``` | ||||
* | Merge pull request #6398 from pmahoney/threadsafe-connection-pool | Aaron Patterson | 2012-05-19 | 1 | -4/+8 |
| | | | | Synchronize read and modification of @reserved_connections | ||||
* | Ensure that CollectionAssociation#replace returns proper target | Piotr Sarnacki | 2012-05-19 | 1 | -1/+1 |
| | | | | | | | | The fix commited in e2a070c was returning the `new_target`, as a try to return whatever user replaced association with. The problem is, the resulting association target may be ordered differently. In such case we want to return the target that will be later used for that association. | ||||
* | Fix HABTM syntax error in Ruby 1.8.x | Ernie Miller | 2012-05-18 | 1 | -2/+2 |
| | |||||
* | fix #delete_all with habtm with :delete_sql | Jon Leighton | 2012-05-18 | 1 | -0/+1 |
| | |||||
* | Perf: Don't load the association for #delete_all. | Jon Leighton | 2012-05-18 | 4 | -9/+33 |
| | | | | | | | | Bug #6289 Conflicts: activerecord/test/cases/associations/has_many_associations_test.rb | ||||
* | Fix CollectionAssociation#replace to return new target (closes #6231) | Piotr Sarnacki | 2012-05-16 | 1 | -0/+2 |
| | | | | | | Conflicts: activerecord/test/cases/associations/has_many_associations_test.rb | ||||
* | Remove unused private method yaml_fixtures_key | Alexey Muranov | 2012-05-11 | 1 | -3/+0 |
| | |||||
* | Return false for exists? with new records - fixes #6199. | Andrew White | 2012-05-10 | 1 | -2/+1 |
| | | | | (cherry picked from commit fa21b73ebb8339ad388f149c817c433b6254d490) | ||||
* | Merge pull request #6221 from ↵ | Jeremy Kemper | 2012-05-09 | 1 | -7/+26 |
|\ | | | | | | | | | alexeymuranov/deprecate__instantiate_fixtures__arity Deprecate ActiveRecord::Fixtures.instantiate_fixtures unused parameter | ||||
| * | Remove deprecated use of ::instantiate_fixtures | Alexey Muranov | 2012-05-10 | 1 | -4/+4 |
| | | |||||
| * | Deprecate ::instantiate_fixtures unused parameter | Alexey Muranov | 2012-05-10 | 1 | -3/+22 |
| | | | | | | | | | | | | Deprecate the use of AcitiveRecord::Fixtures::instantiate_fixtures(object, fixture_set_name, fixture_set, load_instances = true), use instead instantiate_fixtures(object, fixture_set, load_instances = true). To be changed in master branch. | ||||
* | | Stop showing deprecations for Ruby 1.8.7 with remove_column | Carlos Antonio da Silva | 2012-05-09 | 2 | -4/+6 |
|/ | | | | | String is Enumerable in 1.8.7, which means that passing a String to remove_column was generating deprecation warnings during tests. | ||||
* | Merge pull request #6128 from frodsan/delete_all_limit_32 | Aaron Patterson | 2012-05-04 | 1 | -0/+2 |
|\ | | | | | Fix #4979 against 3-2-stable | ||||
| * | Fix #4979 against 3-2-stable - delete_all raise an error if a limit is provided | Francesco Rodriguez | 2012-05-02 | 1 | -0/+2 |
| | | |||||
* | | Deprecate remove_column with array as an argument | Piotr Sarnacki | 2012-05-02 | 2 | -0/+13 |
|/ | |||||
* | Be sure to correctly fetch PK name from MySQL even if the PK has some custom ↵ | Akira Matsuda | 2012-04-19 | 1 | -1/+1 |
| | | | | | | | | | | | option Backports #5900 Conflicts: activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb | ||||
* | Removes unneeded caching from ActiveRecord::Base.relation | Benedikt Deicke | 2012-04-19 | 1 | -4/+3 |
| | |||||
* | Revert "Revert "Fix #5667. Preloading should ignore scoping."" | Benedikt Deicke | 2012-04-19 | 1 | -2/+3 |
| | | | | | | | | This reverts commit 1166d49f62ccab789be208112163ad13183224e2. Conflicts: activerecord/test/cases/associations/eager_test.rb | ||||
* | Removes caching from ActiveRecord::Core::ClassMethods#relation | Benedikt Deicke | 2012-04-19 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | The #relation method gets called in four places and the return value was instantly cloned in three of them. The only place that did not clone was ActiveRecord::Scoping::Default::ClassMethods#unscoped. This introduced a bug described in #5667 and should really clone the relation, too. This means all four places would clone the relation, so it doesn't make a lot of sense caching it in the first place. The four places with calls to relations are: activerecord/lib/active_record/scoping/default.rb:110:in `block in build_default_scope'" activerecord/lib/active_record/scoping/default.rb:42:in `unscoped'" activerecord/lib/active_record/scoping/named.rb:38:in `scoped'" activerecord/lib/active_record/scoping/named.rb:52:in `scope_attributes'" Conflicts: activerecord/lib/active_record/core.rb | ||||
* | Revert "Fix #5667. Preloading should ignore scoping." | Jeremy Kemper | 2012-04-18 | 1 | -3/+2 |
| | | | | | | | | Causes a subtle regression where record.reload includes the default scope. Hard to reproduce in isolation. Seems like the relation is getting infected by some previous usage. This reverts commit dffbb521a0d00c8673a3ad6e0e8ff526f32daf4e. | ||||
* | Check for nil logger | Norman Clarke | 2012-04-18 | 1 | -1/+1 |
| | |||||
* | Merge pull request #5725 from kevmoo/remove_unused_castcode | Xavier Noria | 2012-04-09 | 1 | -2/+0 |
|\ | | | | | Remove unused castcode | ||||
| * | Remove unused 'cast_code' variable | Kevin Moore | 2012-04-03 | 1 | -2/+0 |
| | | |||||
* | | log which config format AR uses to connect with | Terence Lee | 2012-04-03 | 1 | -0/+4 |
|/ | |||||
* | DATABASE_URL allows omission of database.yml | Tim Pope | 2012-04-03 | 1 | -1/+3 |
| | |||||
* | Merge pull request #5662 from arturopie/3-2_fixing_IM_when_using_find_select | Aaron Patterson | 2012-03-30 | 2 | -10/+23 |
|\ | | | | | Fixing Identity Map when using find select in rails 3.2 | ||||
| * | refactor instantiate method in base, so we remove nesting if's which make ↵ | Arturo Pie | 2012-03-29 | 2 | -12/+19 |
| | | | | | | | | | | | | | | | | the code harder to read. Minor changes to contain_all_columns in IdentityMap. Conflicts: activerecord/lib/active_record/base.rb | ||||
| * | refactor the checking of the attributes of the record in IdentityMap#add, so ↵ | Arturo Pie | 2012-03-29 | 1 | -1/+7 |
| | | | | | | | | it's more readable | ||||
| * | Do not add record to identity map if the record doesn't have values for all ↵ | Arturo Pie | 2012-03-29 | 1 | -1/+1 |
| | | | | | | | | the columns, so we don't get 'MissingAttributeError' later when trying to access other fields of the same record. | ||||
* | | Merge branch '3-2-3' into 3-2-stable | Santiago Pastorino | 2012-03-30 | 1 | -1/+1 |
|\ \ | |||||
| * | | Bump up to 3.2.3 | Santiago Pastorino | 2012-03-30 | 1 | -1/+1 |
| | | | |||||
| * | | Bumping to 3.2.3.rc2 | Santiago Pastorino | 2012-03-29 | 1 | -1/+1 |
| | | | |||||
* | | | Fix #5667. Preloading should ignore scoping. | Jon Leighton | 2012-03-30 | 1 | -2/+3 |
| |/ |/| | | | | | | | | | Conflicts: activerecord/test/cases/associations/eager_test.rb | ||||
* | | Fix #5549. | Jon Leighton | 2012-03-28 | 2 | -3/+7 |
| | | |||||
* | | Merge pull request #5616 from cbartlett/migration-indent | Santiago Pastorino | 2012-03-28 | 1 | -2/+2 |
| | | | | | | | | Fix indenting in migration generator | ||||
* | | Merge pull request #5618 from lest/patch-1 | Piotr Sarnacki | 2012-03-27 | 1 | -0/+1 |
|\ \ | |/ |/| | force datetime attributes to be changed | ||||
| * | force datetime attributes to be changed | Sergey Nartimov | 2012-03-27 | 1 | -0/+1 |
| | | | | | | | | backport ddb5d2f756d9d2655a07791a3b62832efd588474 to 3-2-stable | ||||
* | | Bumping to 3.2.3.rc1 | Santiago Pastorino | 2012-03-27 | 1 | -2/+2 |
| | | |||||
* | | Merge pull request #2621 from icco/master | Aaron Patterson | 2012-03-26 | 1 | -1/+1 |
|/ | | | | Issue with schema dump | ||||
* | Merge pull request #5537 from kennyj/fix_4399-32 | Aaron Patterson | 2012-03-23 | 1 | -6/+22 |
|\ | | | | | [3-2-stable] migrate(:down) method with table_name_prefix | ||||
| * | migrate(:down) method with table_name_prefix | kennyj | 2012-03-21 | 1 | -6/+22 |
| | | |||||
* | | [3-2-stable] Port of #5522 'Fix adding/removing field's index when ↵ | Marcelo Silveira | 2012-03-21 | 1 | -0/+3 |
| | | | | | | | | generating migration' | ||||
* | | [3-2-stable] Remove blank line from generated migration | Marcelo Silveira | 2012-03-20 | 1 | -1/+1 |
|/ | |||||
* | Fix GH #5435. db:structure:dump should be re-enable. | kennyj | 2012-03-18 | 1 | -0/+1 |
| | |||||
* | Merge pull request #5437 from kennyj/fix_5430 | Aaron Patterson | 2012-03-15 | 1 | -1/+1 |
| | | | | Fix GH #5430. A Payload name for schema_search_path should be SCHEMA. | ||||
* | ConnectionPool.checkout takes account of ruby using 'non-blocking condition ↵ | Jonathan Rochkind | 2012-03-13 | 1 | -9/+18 |
| | | | | variables' in mutex ConditionVariables | ||||
* | [3-2-stable] Fix GH #5399. connection_pools's keys are ↵ | kennyj | 2012-03-14 | 1 | -1/+1 |
| | | | | ActiveRecord::Base::ConnectionSpecification objects. | ||||
* | fix activerecord query_method regression with offset into Fixnum | Denis Jean | 2012-03-13 | 1 | -1/+1 |
| | | | | | | add test to show offset query_methods on mysql & mysql2 change test to cover public API |