aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
Commit message (Collapse)AuthorAgeFilesLines
* Adding test_has_many_through_has_one_with_has_many_through_source_reflection ↵Jon Leighton2010-10-121-1/+1
| | | | and modifying ThroughAssociationScope to make it work correctly.
* Support has_one through assocs as the source associationJon Leighton2010-10-121-10/+21
|
* Refactoring to remove duplication introduced by the last commitJon Leighton2010-10-101-160/+145
|
* Add support for nested through associations in JoinAssociation. Hence ↵Jon Leighton2010-10-092-89/+89
| | | | Foo.joins(:bar) will work for through associations. There is some duplicated code now, which will be refactored.
* Merge branch 'master' into nested_has_many_throughJon Leighton2010-10-0610-66/+96
|\
| * create fewer objects, call fewer methods in extract_pg_identifier_from_nameAaron Patterson2010-10-041-3/+3
| |
| * * + flatten is not required in >= Ruby 1.8.7Aaron Patterson2010-10-041-1/+1
| |
| * converting inject([]) to mapAaron Patterson2010-10-031-4/+3
| |
| * speed up duplicate migration detectionAaron Patterson2010-10-031-6/+5
| |
| * reduce the number of calls to camelizeAaron Patterson2010-10-031-3/+4
| |
| * convertion MigrationProxy to a Struct, initialize instance variablesAaron Patterson2010-10-031-7/+6
| |
| * dry up some migration logicAaron Patterson2010-10-031-2/+4
| |
| * no need to differentiate between nil and false in this caseAaron Patterson2010-10-031-2/+2
| |
| * lengths will be nil or an arrayAaron Patterson2010-10-031-2/+2
| |
| * remove a few function callsAaron Patterson2010-10-031-3/+5
| |
| * be kind to the garbage collector and reuse our visitor objectAaron Patterson2010-10-031-1/+4
| |
| * avoid creating objects when we canAaron Patterson2010-10-033-14/+7
| |
| * Rely on Rack::Session stores API for more compatibility across the Ruby world.José Valim2010-10-031-2/+5
| |
| * Refactor AssociationCollection#include? with objects in memoryCarlos Antonio da Silva2010-10-021-4/+3
| | | | | | | | Signed-off-by: José Valim <jose.valim@gmail.com>
| * Arel::Sql::Engine.new does not do anything anymoreAaron Patterson2010-09-302-2/+2
| |
| * type_name should check for blank because people may have messed up databasesAaron Patterson2010-09-301-1/+1
| |
| * build_where should be privateAaron Patterson2010-09-301-2/+2
| |
| * type_name is never a blank string, so use faster .nil? callAaron Patterson2010-09-301-1/+1
| |
| * AssociationCollection#include? working properly for objects added with build ↵Marcelo Giorgi2010-09-301-0/+13
| | | | | | | | method [#3472 state:resolved]
| * speeding up object instantiation by eliminating instance_evalAaron Patterson2010-09-301-7/+21
| |
| * [#5441 state:resolved] refactoring code to determine aggregate columnAaron Patterson2010-09-301-11/+14
| |
* | Refactoring JoinDependency and friends. This improves the code (IMO) ↵Jon Leighton2010-10-063-197/+313
| | | | | | | | 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.
* | Add support for table aliasing, with a test that needs aliasing in order to ↵Jon Leighton2010-10-021-13/+37
| | | | | | | | 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 Leighton2010-10-024-47/+95
| | | | | | | | 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 Leighton2010-10-013-19/+47
| | | | | | | | structure of ThroughAssociationScope rather than layering a module over the top
* | Merge branch 'master' into nested_has_many_through_2Jon Leighton2010-09-3019-166/+139
|\|
| * Fix 'rake db:create' is ignore encoding when using postgres [#5717 ↵yalab2010-09-301-1/+1
| | | | | | | | | | | | state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
| * Added config.app_generators to allow configuring application's generators ↵Piotr Sarnacki2010-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from railties. With config.generators becomes a way to configure generators for current instance only. For example: module Blog class Engine < Rails::Engine config.generators do |g| g.orm :active_record end config.app_generators do |g| g.test_framework :rspec end end end such definition sets :active_record as orm for engine and :rspec as test_framework for application. The values set with app_generators can be overwritten in application using config.generators as you would normally do: module MyApp class Application < Rails::Application config.generators do |g| g.test_framework :test_unit end end end
| * double negative is not goodNeeraj Singh2010-09-301-1/+1
| |
| * no need of nil checkNeeraj Singh2010-09-291-1/+1
| |
| * eliminating method_missing on TableDefinitionAaron Patterson2010-09-291-14/+6
| |
| * DRY up postgresql quote logicAaron Patterson2010-09-291-11/+14
| |
| * fixing where clause indentationAaron Patterson2010-09-291-4/+4
| |
| * use consistent method calls for column inspectionAaron Patterson2010-09-291-1/+1
| |
| * require pg when this adapter is loadedAaron Patterson2010-09-291-5/+4
| |
| * only reopen ConnectionAdapters onceAaron Patterson2010-09-291-2/+0
| |
| * use inheritence to deal with custom methodsAaron Patterson2010-09-292-10/+20
| |
| * just use if rather than nil?Aaron Patterson2010-09-291-1/+1
| |
| * just require sqlite3 when the database adapter is requiredAaron Patterson2010-09-291-4/+1
| |
| * removing more useless code! yay!Aaron Patterson2010-09-281-6/+2
| |
| * SqlLiteral is a string, so we can dry up these conditionalsAaron Patterson2010-09-281-4/+3
| |
| * shorten up or sql literal creation statementsAaron Patterson2010-09-281-4/+2
| |
| * we only care about arrays and stringsAaron Patterson2010-09-281-1/+1
| |
| * dry up calls to arel.join()Aaron Patterson2010-09-281-5/+4
| |
| * removing unused lasgnsAaron Patterson2010-09-281-4/+4
| |