Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Refactoring JoinDependency and friends. This improves the code (IMO) ↵ | Jon Leighton | 2010-10-06 | 7 | -12/+43 |
| | | | | including adding some explanatory comments, but more importantly structures it in such a way as to allow a JoinAssociation to produce an arbitrary number of actual joins, which will be necessary for nested has many through support. Also added 3 tests covering functionality which existed but was not previously covered. | ||||
* | A failing test for a nested has many through association loaded via ↵ | Jon Leighton | 2010-10-05 | 1 | -0/+6 |
| | | | | Foo.joins(:bar) | ||||
* | Fix the tests (I have actually verified that these are also the 'right' ↵ | Jon Leighton | 2010-10-03 | 6 | -24/+24 |
| | | | | fixes, rather than just making the tests pass again) | ||||
* | Add support for table aliasing, with a test that needs aliasing in order to ↵ | Jon Leighton | 2010-10-02 | 6 | -2/+38 |
| | | | | work correctly. This test incidentally provides a more complicated test case (4 inner joins, 2 using polymorphism). | ||||
* | Integrate nested support into ThroughAssociationScope, using my concept of ↵ | Jon Leighton | 2010-10-02 | 1 | -12/+12 |
| | | | | generating a 'chain' of reflections to be joined. It seems to work at the moment, all existing tests are passing. There may be further complications as we add more test cases for nested associations, though. | ||||
* | Started implementing nested :through associations by using the existing ↵ | Jon Leighton | 2010-10-01 | 1 | -13/+13 |
| | | | | structure of ThroughAssociationScope rather than layering a module over the top | ||||
* | Prevent ↵ | Jon Leighton | 2010-09-30 | 1 | -2/+2 |
| | | | | test_has_many_through_a_has_many_through_association_on_through_reflection failing for me due to ordering of the results | ||||
* | Merge branch 'master' into nested_has_many_through_2 | Jon Leighton | 2010-09-30 | 12 | -56/+209 |
|\ | |||||
| * | eliminating method_missing on TableDefinition | Aaron Patterson | 2010-09-29 | 1 | -2/+12 |
| | | |||||
| * | fisting test organization | Aaron Patterson | 2010-09-29 | 2 | -52/+50 |
| | | |||||
| * | Revert "porting 515917f5d8678af6c57842ca5dfd7c18e67ff1fe to master" | Aaron Patterson | 2010-09-28 | 1 | -6/+0 |
| | | | | | | | | This reverts commit bee447a5b9fe1d683c6cc69aefb7fc22c2a9d9af. | ||||
| * | Set attributes properly for model built from association with conditions ↵ | Marcelo Giorgi | 2010-09-28 | 6 | -1/+47 |
| | | | | | | | | | | | | [#5562 state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
| * | fixing indentation warning | Aaron Patterson | 2010-09-28 | 1 | -1/+1 |
| | | |||||
| * | Test add_index and remove_index with a symbol name #4891 | Étienne Barrié | 2010-09-28 | 1 | -0/+7 |
| | | |||||
| * | porting 515917f5d8678af6c57842ca5dfd7c18e67ff1fe to master | Aaron Patterson | 2010-09-28 | 1 | -0/+6 |
| | | |||||
| * | adding test cases for the dynamic finder matcher match method | Aaron Patterson | 2010-09-27 | 1 | -0/+49 |
| | | |||||
| * | @klass also uses DynamicFinderMatch, so no need for it on the relation | Aaron Patterson | 2010-09-27 | 1 | -0/+5 |
| | | |||||
| * | make sure we use the engine assigned to the table when quoting | Aaron Patterson | 2010-09-27 | 1 | -0/+18 |
| | | |||||
| * | Fix for #5579 involved the code change for both has_one and has_many ↵ | Neeraj Singh | 2010-09-27 | 1 | -1/+9 |
| | | | | | | | | | | | | | | | | relationships. The path included test only for has_one. This patch adds test for has_many relationship. [#5706 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
| * | Fix for nested_attributes with has_many association fails when a single ↵ | Neeraj Singh | 2010-09-27 | 1 | -0/+8 |
| | | | | | | | | | | | | | | | | record is being updated. [#5705 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
| * | adding a test for slug behavior | Aaron Patterson | 2010-09-27 | 1 | -0/+4 |
| | | |||||
| * | Fix remove_index issue when provided :name is a symbol | Tim Connor | 2010-09-26 | 1 | -1/+1 |
| | | | | | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | | Initial nested_has_many_through support [#1152] | Bodaniel Jeanes | 2010-09-26 | 6 | -12/+58 |
|/ | |||||
* | Delegate ActiveRecord::Base.offset to scoped methods (analogous to limit) ↵ | Marcelo Giorgi | 2010-09-24 | 1 | -0/+6 |
| | | | | | | [#5688 state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | restore behavior of touch for models without :updated_xx [#5439 state:resolved] | tnp | 2010-09-24 | 1 | -5/+13 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | reject_id option should be respected while using nested_attributes | Neeraj Singh | 2010-09-24 | 1 | -0/+9 |
| | | | | | | [#5579 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Hash#to_s behaves differently between 1.8 and 1.9, so adjust accordingly | Aaron Patterson | 2010-09-23 | 1 | -1/+1 |
| | |||||
* | testing poor behavior of hash serialization | Aaron Patterson | 2010-09-22 | 1 | -0/+4 |
| | |||||
* | fixing tests. woo | Aaron Patterson | 2010-09-21 | 1 | -4/+7 |
| | |||||
* | remove join table rows before removing owner row for habtm associations, ↵ | Hemant Kumar | 2010-09-21 | 1 | -1/+1 |
| | | | | fixes#5674 | ||||
* | providing arel with column information when possible [#5392 state:resolved] | Aaron Patterson | 2010-09-21 | 2 | -0/+19 |
| | |||||
* | Remove helper methods that were moved to helper.rb | Emilio Tagua | 2010-09-21 | 1 | -15/+0 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Move helper methods to helper.rb. Make test not depend on local TZ to pass ↵ | Emilio Tagua | 2010-09-21 | 2 | -9/+27 |
| | | | | | | or fail. Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Fix issue with remove_index and add unit test [#5645 state:resolved] | Tim Connor | 2010-09-18 | 1 | -3/+4 |
| | |||||
* | expanding the test to include both type of order declaration | Neeraj Singh | 2010-09-18 | 3 | -8/+32 |
| | | | | | | | | | while declaring default_scope Also added test for unscoped using block style with four different combinations Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | removing nonsensical tests, limit now actually adds a limit | Aaron Patterson | 2010-09-15 | 2 | -5/+1 |
| | |||||
* | specific number of spaces should not be enforced | Aaron Patterson | 2010-09-10 | 1 | -1/+1 |
| | |||||
* | added a test for relation which checks intersection between a relation and ↵ | kane | 2010-09-10 | 1 | -0/+6 |
| | | | | | | an array works in both directions Signed-off-by: Mikel Lindsaar <raasdnil@gmail.com> | ||||
* | fixed Subject model after_initialize callback for test_oracle_synonym test | Raimonds Simanovskis | 2010-09-09 | 1 | -3/+7 |
| | |||||
* | Fewer object allocations | Jeremy Kemper | 2010-09-09 | 1 | -3/+3 |
| | |||||
* | Cache unserialized attributes | Jeremy Kemper | 2010-09-09 | 1 | -9/+12 |
| | |||||
* | Add tests for Relation#only. | Emilio Tagua | 2010-09-09 | 1 | -0/+11 |
| | |||||
* | serialized attributes should be serialized before validation [#5525 ↵ | Aaron Patterson | 2010-09-07 | 1 | -1/+5 |
| | | | | state:resolved] | ||||
* | fixed some issues with JSON encoding | Jakub Suder | 2010-09-07 | 1 | -0/+7 |
| | | | | | | | | | | | - as_json in ActiveModel should return a hash and handle :only/:except/:methods options - Array and Hash should call as_json on their elements - json methods should not modify options argument [#5374 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | select should raise error when no block or no parameter is passed | Aaron Patterson | 2010-09-07 | 1 | -0/+4 |
| | |||||
* | Cleanup deprecation warnings in active record | Carlos Antonio da Silva | 2010-09-06 | 3 | -56/+8 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | failing test for reorder overriding default_scope | Nick Ragaz | 2010-09-05 | 2 | -1/+7 |
| | | | | | | [5528] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | order should always be concatenated. | Neeraj Singh | 2010-09-05 | 5 | -6/+34 |
| | | | | | | | | | | | | | | | | | | | | | | order that is declared first has highest priority in all cases. Here are some examples. Car.order('name desc').find(:first, :order => 'id').name Car.named_scope_with_order.named_scope_with_another_order Car.order('id DESC').scoping do Car.find(:first, :order => 'id asc') end No special treatment to with_scope or scoping. Also note that if default_scope declares an order then the order declared in default_scope has the highest priority unless with_exclusive_scope is used. Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | Fix copying migrations to empty directory | Piotr Sarnacki | 2010-09-03 | 2 | -0/+14 |
| | |||||
* | Implemented ActiveRecord::Migrations#copy based on James Adam's idea | Piotr Sarnacki | 2010-09-03 | 9 | -0/+198 |
| | | | | | | | | | | | | | | | ActiveRecord::Migration#copy allows to copy migrations from one place to another, changing migrations versions and adding scope to filename. For example: ActiveRecord::Migration.copy("db/migrate", :blog_engine => "vendor/gems/blog/db/migrate") will copy all migrations from vendor/gems/blog/db/migrate to db/migrate with such format: Versions of copied migrations will be reversioned to be appended after migrations that already exists in db/migrate |