Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | make a singleton for AssociationScope | Aaron Patterson | 2014-02-14 | 1 | -2/+1 |
| | | | | | AssociationScope no longer maintains state, so we're safe to keep a singleton and save on GC time | ||||
* | pass the association and connection to the scope method | Aaron Patterson | 2014-02-14 | 1 | -2/+4 |
| | |||||
* | remove unused fixtures from sqlite3 test cases | Rajarshi Das | 2014-02-14 | 1 | -1/+1 |
| | |||||
* | Merge pull request #14034 from ↵ | Yves Senn | 2014-02-13 | 2 | -3/+31 |
|\ | | | | | | | | | hdabrows/drop-correct-index-when-reverting-migration Drop the correct index after reverting a migration | ||||
| * | Drop the correct index after reverting a migration | Hubert Dąbrowski | 2014-02-13 | 2 | -3/+31 |
| | | | | | | | | | | | | Previously when reverting a migration which added a named index it would instead drop a corresponding index with matching columns but without a name. | ||||
* | | tests are responsible to clean up afterwards. | Yves Senn | 2014-02-13 | 1 | -82/+114 |
| | | | | | | | | | | remove created state after test execution, not before the next test. This prevents the leak of the `ex` table outside of a single test. | ||||
* | | Terminate the backend ourselves on PG 9.2+ | Matthew Draper | 2014-02-12 | 1 | -19/+29 |
|/ | | | | This should make it harder to accidentally break this test. | ||||
* | test case to illustrate current PostgreSQL composite behavior. | Yves Senn | 2014-02-11 | 1 | -0/+42 |
| | |||||
* | add activerecord test coverage for `sanitize_sql_array` | Dmitry Polushkin | 2014-02-09 | 1 | -0/+5 |
| | | | | check it is handles empty statement | ||||
* | Merge pull request #13981 from Fortisque/kevin/postgresql_reaper_threadsafe | Aaron Patterson | 2014-02-08 | 2 | -2/+2 |
|\ | | | | | Reaper has access to threadsafe active? call | ||||
| * | Reaper has access to threadsafe active? call | Kevin Casey | 2014-02-08 | 2 | -2/+2 |
| | | |||||
* | | Merge pull request #13978 from Fortisque/kevin/validation_context_for_children | Aaron Patterson | 2014-02-08 | 3 | -0/+26 |
|\ \ | | | | | | | context in validation goes through has many relationship | ||||
| * | | context in validation goes through has many relationship | Kevin Casey | 2014-02-08 | 3 | -0/+26 |
| | | | |||||
* | | | Skips linked folder tests if symlink is invalid | Mikko Johansson | 2014-02-09 | 1 | -2/+6 |
| |/ |/| | |||||
* | | Add test case for autosave HasMany with accepts_nested_attributes. | Lauro Caetano | 2014-02-08 | 3 | -0/+33 |
| | | | | | | | | | | | | | | It should not save the parent record when the nested attributes are invalid. Test case to cover #8194. | ||||
* | | Adjust test value so that timezone has no effect | Andrew White | 2014-02-07 | 1 | -1/+1 |
|/ | | | | | | If the test is run in a timezone that is behind UTC it fails because the time generated is ahead of 0000-01-01 00:00:00. Just increase the time subtracted so that timezone has no effect. | ||||
* | Return sized enumerator from Batches#find_each | Marc-Andre Lafortune | 2014-02-05 | 2 | -0/+14 |
| | |||||
* | Return sized enumerator from Batches#find_in_batches | Marc-Andre Lafortune | 2014-02-05 | 1 | -0/+10 |
| | |||||
* | Strengthen test with different nb of rows and columns | Marc-Andre Lafortune | 2014-02-05 | 1 | -2/+4 |
| | |||||
* | Merge pull request #13949 from vajrasky/fix_typo_column_definition_test | Yves Senn | 2014-02-05 | 1 | -2/+2 |
|\ | | | | | Fixed typos in column_definition_test.rb. | ||||
| * | Fixed typo in column_definition_test.rb. | Vajrasky Kok | 2014-02-05 | 1 | -2/+2 |
| | | |||||
* | | docs, AR already auto-detects primary keys. Closes #13946. [ci skip] | Yves Senn | 2014-02-05 | 2 | -3/+5 |
|/ | | | | | This behavior was introduced since Rails 3.1 (207f266ccaaa9cd04cd2a7513ae5598c4358b510) but the docs were still out of date. | ||||
* | Merge pull request #13935 from arthurnn/fix_12566 | Rafael Mendonça França | 2014-02-04 | 1 | -0/+15 |
|\ | | | | | Make sure transaction state resets after commit | ||||
| * | Make sure transaction state resets after commit | Arthur Neves | 2014-02-03 | 1 | -0/+15 |
| | | | | | | | | [fixes #12566] | ||||
* | | Merge pull request #13899 from ↵ | Rafael Mendonça França | 2014-02-04 | 1 | -0/+10 |
|\ \ | |/ |/| | | | | | Fortisque/kevin/active_record_HABTM_with_belongs_to destruction errors out on HABTM w/out primary key | ||||
| * | fix HABTM w/out primary key errors on destruction | Kevin Casey | 2014-02-02 | 1 | -0/+10 |
| | | |||||
* | | pass `habtm :autosave` to underlying `hm:t` association. Closes #13923. | Yves Senn | 2014-02-03 | 2 | -7/+27 |
| | | |||||
* | | Remove warnings for already defined methods | Rafael Mendonça França | 2014-02-01 | 1 | -1/+3 |
| | | |||||
* | | Merge pull request #13688 from jbaudanza/psql-index-exists | Rafael Mendonça França | 2014-02-01 | 1 | -0/+12 |
|\ \ | | | | | | | | | | | | | | | | | | | PostgreSQL implementation of SchemaStatements#index_name_exists? Conflicts: activerecord/CHANGELOG.md | ||||
| * | | psql implementation of #index_name_exists? | Jonathan Baudanza | 2014-01-16 | 1 | -0/+12 |
| | | | |||||
* | | | Fixes issue with parsing whitespace content back from database - fixes #13907 | Mauricio Linhares | 2014-02-01 | 1 | -0/+12 |
| |/ |/| | |||||
* | | Merge pull request #13896 from laurocaetano/dangerous_association_names | Carlos Antonio da Silva | 2014-01-31 | 3 | -0/+30 |
|\ \ | | | | | | | Associations now raises `ArgumentError` on name conflicts. Closes #13217. | ||||
| * | | Associations now raise `ArgumentError` on name conflicts. | Lauro Caetano | 2014-01-31 | 3 | -0/+30 |
| | | | | | | | | | | | | | | | Dangerous association names conflicts include instance or class methods already defined by `ActiveRecord::Base`. | ||||
* | | | Remove unused variable. | Tim Fenney | 2014-01-31 | 1 | -1/+1 |
|/ / | |||||
* | | Merge pull request #13859 from huoxito/let-it-go | Rafael Mendonça França | 2014-01-30 | 1 | -0/+10 |
|\ \ | | | | | | | Let `unscope` ignore non Arel scope.where_values | ||||
| * | | Let `unscope` ignore non Arel scope.where_values | Washington Luiz | 2014-01-30 | 1 | -0/+10 |
| | | | |||||
* | | | Merge pull request #13886 from arthurnn/fix_relation_arel | Rafael Mendonça França | 2014-01-30 | 1 | -0/+23 |
|\ \ \ | |/ / |/| | | Fix regression on .select method | ||||
| * | | Fix regression on `.select_*` methods. | Arthur Neves | 2014-01-30 | 1 | -0/+23 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a common pattern: ``` query = author.posts.select(:title) connection.select_one(query) ``` However `.select` returns a ActiveRecord::AssociationRelation, which has the bind information, so we can use that to get the right sql query. Also fix select_rows on postgress and sqlite3 that were not using the binds [fixes #7538] [fixes #12017] [related #13731] [related #12056] | ||||
* | | | Remove automatic removal of Date/Time stubs after each test case | Rafael Mendonça França | 2014-01-30 | 1 | -1/+5 |
| | | | | | | | | | | | | | | | | | | This behavior is only work out-of-box with minitest and also add a downside to run after each test case, even if we don't used the travel or travel_to methods | ||||
* | | | Merge pull request #13878 from marcandre/leave_my_options_alone | Rafael Mendonça França | 2014-01-30 | 1 | -0/+6 |
|\ \ \ | |/ / |/| | | find_in_batches should not mutate its argument | ||||
| * | | find_in_batches should not mutate its argument | Marc-Andre Lafortune | 2014-01-29 | 1 | -0/+6 |
| | | | |||||
* | | | Aesthetic | Rafael Mendonça França | 2014-01-29 | 1 | -6/+7 |
| | | | |||||
* | | | Fixing issue with activerecord serialization not being able to dump a record ↵ | Mauricio Linhares | 2014-01-29 | 1 | -0/+23 |
|/ / | | | | | | | after loading it from YAML - fixes #13861 | ||||
* | | Merge pull request #13201 from marcandre/find_in_batch_enumerator | Rafael Mendonça França | 2014-01-29 | 1 | -0/+13 |
|\ \ | | | | | | | | | | | | | | | | | | | | | | `find_in_batches` now returns an `Enumerator` Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/relation/batches.rb | ||||
| * | | `find_in_batches` now returns an `Enumerator` when called without a block, ↵ | Marc-Andre Lafortune | 2013-12-06 | 1 | -0/+13 |
| | | | | | | | | | | | | | | | | | | so that it can be chained with other `Enumerable` methods. | ||||
* | | | `enum` now raises on "dangerous" name conflicts | Godfrey Chan | 2014-01-29 | 1 | -0/+59 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Dangerous name conflicts includes instance or class method conflicts with methods defined within `ActiveRecord::Base` but not its ancestors, as well as conflicts with methods generated by other enums on the same class. Fixes #13389. | ||||
* | | | `scope` now raises on "dangerous" name conflicts | Godfrey Chan | 2014-01-29 | 1 | -0/+57 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to dangerous attribute methods, a scope name conflict is dangerous if it conflicts with an existing class method defined within `ActiveRecord::Base` but not its ancestors. See also #13389. *Godfrey Chan*, *Philippe Creux* | ||||
* | | | Fixed a bug in AR::Base#respond_to? | Godfrey Chan | 2014-01-29 | 1 | -0/+5 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: >> ActiveRecord::Base.respond_to?(:find_by_something) NoMethodError: undefined method `abstract_class?' for Object:Class After: >> ActiveRecord::Base.respond_to?(:find_by_something) => false | ||||
* | | | Correctly send the string given to lock! and reload(:lock) to the lock scope ↵ | Mauricio Linhares | 2014-01-29 | 1 | -0/+11 |
| | | | | | | | | | | | | | | | | | | - fixes #13788 As per the documentation at lock!, if the :lock option is a string it should use the given SQL to generate the lock statement. | ||||
* | | | Handle aliased attributes in AR::Relation#select, #order, etc. | Tsutomu Kuroda | 2014-01-29 | 2 | -0/+35 |
| | | | | | | | | | | | | | | | | | | | | | With this we can write `Model#select(:aliased)`, `Model#order(:aliased)`, `Model#reoder(aliased: :desc)`, etc. Supplementary work to 54122067acaad39b277a5363c6d11d6804c7bf6b. |