Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | 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 |
| | |||||
* | Rename Model.conditions and relation.conditions to .where | Pratik Naik | 2009-12-26 | 1 | -1/+1 |
| | |||||
* | Revert "Revert "Assert primary key does not exist in habtm when the ↵ | Jeremy Kemper | 2009-11-23 | 1 | -13/+1 |
| | | | | | | | | | | | | | association is defined, instead of doing that everytime a record is inserted."" This reverts commit 2b82708b0efb3a3458e8177beab58f0c585788ae. [#3128 state:resolved] Conflicts: activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb | ||||
* | Revert "Split arel_table into method to get a relation and another to ↵ | Jeremy Kemper | 2009-11-13 | 1 | -2/+2 |
| | | | | | | memoize the default relation." This reverts commit bd51790895fc75a3b4e19e8dd7aa6dc389d77068. | ||||
* | Split arel_table into method to get a relation and another to memoize the ↵ | Jeremy Kemper | 2009-11-13 | 1 | -2/+2 |
| | | | | default relation. | ||||
* | Arel::In -> Arel::Predicates::In | Jeremy Kemper | 2009-11-02 | 1 | -1/+1 |
| | |||||
* | Merge commit 'rails/master' | Emilio Tagua | 2009-09-14 | 1 | -2/+2 |
|\ | |||||
| * | Fix habtm associations when using multiple databases | sdsykes | 2009-09-12 | 1 | -2/+2 |
| | | | | | | | | | | | | [#3128] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> |