Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix #3672 again (dependent: delete_all perf) | Jon Leighton | 2011-12-14 | 1 | -0/+4 |
| | |||||
* | Make it the responsibility of the connection to hold onto an ARel visitor ↵ | Jon Leighton | 2011-08-08 | 1 | -2/+2 |
| | | | | for generating SQL. This improves the code architecture generally, and solves some problems with marshalling. Adapter authors please take note: you now need to define an Adapter.visitor_for method, but it degrades gracefully with a deprecation warning for now. | ||||
* | Only save the record once when calling create! on a collection association. ↵ | Jon Leighton | 2011-05-31 | 1 | -2/+8 |
| | | | | Fixes #1360. | ||||
* | Move the code which builds a scope for through associations into a generic ↵ | Jon Leighton | 2011-03-10 | 1 | -22/+0 |
| | | | | AssociationScope class which is capable of building a scope for any association. | ||||
* | Delegate Association#options to the reflection, and replace ↵ | Jon Leighton | 2011-02-21 | 1 | -3/+3 |
| | | | | 'reflection.options' with 'options'. Also add through_options and source_options methods for through associations. | ||||
* | Associations - where possible, call attributes methods rather than directly ↵ | Jon Leighton | 2011-02-21 | 1 | -14/+14 |
| | | | | accessing the instance variables | ||||
* | Split AssociationProxy into an Association class (and subclasses) which ↵ | Jon Leighton | 2011-02-18 | 1 | -19/+17 |
| | | | | manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more. | ||||
* | Get rid of AssociationCollection#save_record | Jon Leighton | 2011-02-14 | 1 | -5/+3 |
| | |||||
* | Add interpolation of association conditions back in, in the form of proc { ↵ | Jon Leighton | 2011-02-14 | 1 | -2/+2 |
| | | | | ... } rather than instance_eval-ing strings | ||||
* | Refactor the implementations of AssociatioCollection#delete and #destroy to ↵ | Jon Leighton | 2011-02-07 | 1 | -1/+1 |
| | | | | be more consistent with each other, and to stop passing blocks around, thus making the execution easier to follow. | ||||
* | Make record.association.destroy(*records) on habtm and hm:t only delete ↵ | Jon Leighton | 2011-02-07 | 1 | -1/+1 |
| | | | | records in the join table. This is to make the destroy method more consistent across the different types of associations. For more details see the CHANGELOG entry. | ||||
* | @join_table_name is no longer used | Jon Leighton | 2011-01-30 | 1 | -2/+1 |
| | |||||
* | Let's be less blasé about method visibility on association proxies | Jon Leighton | 2011-01-30 | 1 | -9/+10 |
| | |||||
* | Removed support for accessing attributes on a has_and_belongs_to_many join ↵ | Jon Leighton | 2011-01-16 | 1 | -62/+6 |
| | | | | table. This has been documented as deprecated behaviour since April 2006. Please use has_many :through instead. A deprecation warning will be added to the 3-0-stable branch for the 3.0.4 release. | ||||
* | Construct an actual ActiveRecord::Relation object for the association scope, ↵ | Jon Leighton | 2011-01-07 | 1 | -8/+8 |
| | | | | rather than a hash which is passed to apply_finder_options. This allows more flexibility in how the scope is created, for example because scope.where(a, b) and scope.where(a).where(b) mean different things. | ||||
* | avoid creating so many Arel::Table objects | Aaron Patterson | 2011-01-05 | 1 | -6/+9 |
| | |||||
* | we have a method for this, so let's use it | Aaron Patterson | 2011-01-05 | 1 | -2/+2 |
| | |||||
* | use arel ast construction rather than generating strings | Aaron Patterson | 2011-01-05 | 1 | -1/+7 |
| | |||||
* | use arel to construct AST rather than generate strings | Aaron Patterson | 2011-01-05 | 1 | -2/+3 |
| | |||||
* | Explicitly select * from has_and_belongs_to_many association tables, ↵ | Raimonds Simanovskis | 2011-01-04 | 1 | -1/+2 |
| | | | | | simplify exists? query Previous version (after commit 3103296a61709e808aa89c3d37cf22bcdbc5a675) was generating wrong SQL for Oracle when calling exists? method on HABTM association. | ||||
* | Create the association scope directly rather than going through with_scope | Jon Leighton | 2011-01-03 | 1 | -1/+1 |
| | |||||
* | Let AssociationCollection#find use #scoped to do its finding. Note that I am ↵ | Jon Leighton | 2011-01-03 | 1 | -15/+19 |
| | | | | removing test_polymorphic_has_many_going_through_join_model_with_disabled_include, since this specifies different behaviour for an association than for a regular scope. It seems reasonable to expect scopes and association proxies to behave in roughly the same way rather than having subtle differences. | ||||
* | Rename AssociationReflection#primary_key_name to foreign_key, since the ↵ | Jon Leighton | 2010-12-31 | 1 | -2/+2 |
| | | | | options key which it relates to is :foreign_key | ||||
* | Refactor we_can_set_the_inverse_on_this? to use a less bizarre name amongst ↵ | Jon Leighton | 2010-12-26 | 1 | -0/+4 |
| | | | | other things | ||||
* | Associations: DRY up the code which is generating conditions, and make it ↵ | Jon Leighton | 2010-12-26 | 1 | -4/+6 |
| | | | | all use arel rather than SQL strings | ||||
* | Remove unnecessary overloaded methods create, create! and create_record from ↵ | Jon Leighton | 2010-12-20 | 1 | -18/+0 |
| | | | | HasAndBelongsToManyAssociation | ||||
* | Specify insert_record with NotImplementedError in AssociationCollection, to ↵ | Jon Leighton | 2010-12-20 | 1 | -5/+1 |
| | | | | indicate that subclasses should implement it. Also add save_record to reduce duplication. | ||||
* | remove calls to deprecated methods | Aaron Patterson | 2010-12-02 | 1 | -2/+3 |
| | |||||
* | removing some calls to insert on arel | Aaron Patterson | 2010-12-02 | 1 | -3/+4 |
| | |||||
* | Partialy revert f1c13b0dd7b22b5f6289ca1a09f1d7a8c7c8584b | José Valim | 2010-11-28 | 1 | -2/+2 |
| | |||||
* | Remove explicit return. | Emilio Tagua | 2010-11-25 | 1 | -2/+2 |
| | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | use persisted? instead of new_record? wherever possible | David Chelimsky | 2010-11-09 | 1 | -1/+1 |
| | | | | | | | | | | | - persisted? is the API defined in ActiveModel - makes it easier for extension libraries to conform to ActiveModel APIs without concern for whether the extended object is specifically ActiveRecord [#5927 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | Refactoring: replace the mix of variables like @finder_sql, @counter_sql, ↵ | Jon Leighton | 2010-10-30 | 1 | -19/+18 |
| | | | | etc with just a single scope hash (created on initialization of the proxy). This is now used consistently across all associations. Therefore, all you have to do to ensure finding/counting etc is done correctly is implement the scope correctly. | ||||
* | Perf: refactor method. | Emilio Tagua | 2010-09-22 | 1 | -11/+8 |
| | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | do not pass nil values to arel | Aaron Patterson | 2010-09-21 | 1 | -1/+1 |
| | |||||
* | mark SQL literals as SQL literals | Aaron Patterson | 2010-08-25 | 1 | -1/+1 |
| | |||||
* | marking sql literals as sql literals | Aaron Patterson | 2010-08-23 | 1 | -1/+1 |
| | |||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 1 | -3/+3 |
| | | | | 's/[ \t]*$//' -i {} \;) | ||||
* | Removing most of the symbol to proc usage in Active Record | Prem Sichanugrist | 2010-08-13 | 1 | -1/+1 |
| | | | | This will hopefully make Active Record run a bit more faster. | ||||
* | do not use arel constants directly | Aaron Patterson | 2010-08-13 | 1 | -1/+1 |
| | |||||
* | symbol to proc is slow, we should avoid it | Aaron Patterson | 2010-08-13 | 1 | -1/+1 |
| | |||||
* | ensuring that description does not exceed 100 columns | Neeraj Singh | 2010-08-02 | 1 | -3/+4 |
| | |||||
* | Ensure all join table attributes will be in the same timestamp. | José Valim | 2010-07-21 | 1 | -11/+21 |
| | |||||
* | Timestamp columns of HABTM join table should record timestamps | Neeraj Singh | 2010-07-21 | 1 | -1/+5 |
| | | | | [#5161 state:resolved] | ||||
* | id is a public method | Santiago Pastorino | 2010-07-21 | 1 | -2/+2 |
| | |||||
* | Ensure that primary_keys of HABTM records is not double quoted | Neeraj Singh | 2010-07-20 | 1 | -2/+2 |
| | | | | [#5152 state:reslved] | ||||
* | Adds title to activerecord/lib/active_record/associations/* | Rizwan Reza | 2010-06-16 | 1 | -0/+1 |
| | |||||
* | save(false) is gone, use save(:validate => false) instead. | José Valim | 2010-01-17 | 1 | -1/+1 |
| | |||||
* | Use Arel::Table instead of ActiveRecord::Relation from HABTM and ↵ | Pratik Naik | 2010-01-01 | 1 | -3/+3 |
| | | | | has_many#delete_records | ||||
* | Add Relation#delete [Pratik Naik, Emilio Tagua] | Pratik Naik | 2010-01-01 | 1 | -1/+1 |
| |