Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Remove Array.wrap calls in ActiveRecord | Rafael Mendonça França | 2012-01-06 | 1 | -2/+0 | |
| | ||||||
* | Don't try to autosave nested assocs. Fixes #2961. | Jon Leighton | 2011-12-14 | 1 | -1/+1 | |
| | ||||||
* | added information about callbacks created by autosave association (#3639) | Jakub Kuźma | 2011-11-28 | 1 | -4/+16 | |
| | ||||||
* | Test case and fix for rails/rails#3450 | Jan Varwig | 2011-11-27 | 1 | -1/+1 | |
| | | | | Asssigning a parent id to a belongs_to association actually updates the object that is validated when the association has :validates => true | |||||
* | Raise error when using write_attribute with a non-existent attribute. | Jon Leighton | 2011-09-13 | 1 | -1/+4 | |
| | | | | | | | | | Previously we would just silently write the attribute. This can lead to subtle bugs (for example, see the change in AutosaveAssociation where a through association would wrongly gain an attribute. Also, ensuring that we never gain any new attributes after initialization will allow me to reduce our dependence on method_missing. | |||||
* | Don't construct association scope in initializer. This yields a big ↵ | Jon Leighton | 2011-07-07 | 1 | -1/+1 | |
| | | | | performance gain for cases where the association is never used to load the target, for example with preloading. Related: #1873. | |||||
* | Remove extra white spaces on ActiveRecord docs. | Sebastian Martinez | 2011-05-23 | 1 | -1/+1 | |
| | ||||||
* | Active Record typos. | R.T. Lechow | 2011-03-05 | 1 | -1/+1 | |
| | ||||||
* | Use proper objects to do the work to build the associations (adding methods, ↵ | Jon Leighton | 2011-02-21 | 1 | -15/+14 | |
| | | | | callbacks etc) rather than calling a whole bunch of methods with rather long names. | |||||
* | Merge remote branch 'rails/master' into identity_map | Emilio Tagua | 2011-02-18 | 1 | -22/+26 | |
|\ | | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations/association.rb activerecord/lib/active_record/fixtures.rb | |||||
| * | Split AssociationProxy into an Association class (and subclasses) which ↵ | Jon Leighton | 2011-02-18 | 1 | -22/+26 | |
| | | | | | | | | manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more. | |||||
* | | Merge remote branch 'rails/master' into identity_map | Emilio Tagua | 2011-02-15 | 1 | -18/+22 | |
|\| | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/examples/performance.rb activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/association_proxy.rb activerecord/lib/active_record/autosave_association.rb activerecord/lib/active_record/base.rb activerecord/lib/active_record/nested_attributes.rb activerecord/test/cases/relations_test.rb | |||||
| * | Get rid of AssociationCollection#save_record | Jon Leighton | 2011-02-14 | 1 | -1/+1 | |
| | | ||||||
| * | just return the record from insert_record, use truthiness for comparisons | Aaron Patterson | 2011-02-07 | 1 | -1/+3 | |
| | | ||||||
| * | Rename AssociationProxy#loaded to loaded! as it mutates the association | Jon Leighton | 2011-01-30 | 1 | -1/+1 | |
| | | ||||||
| * | Allow assignment on has_one :through where the owner is a new record [#5137 ↵ | Jon Leighton | 2011-01-03 | 1 | -0/+1 | |
| | | | | | | | | | | | | | | | | | | | | state:resolved] This required changing the code to keep the association proxy for a belongs_to around, despite its target being nil. Which in turn required various changes to the way that stale target checking is handled, in order to support various edge cases (loaded target is nil then foreign key added, foreign key is changed and then changed back, etc). A side effect is that the code is nicer and more succinct. Note that I am removing test_no_unexpected_aliasing since that is basically checking that the proxy for a belongs_to *does* change, which is the exact opposite of the intention of this commit. Also adding various tests for various edge cases and related things. Phew, long commit message! | |||||
| * | Rename AssociationReflection#primary_key_name to foreign_key, since the ↵ | Jon Leighton | 2010-12-31 | 1 | -3/+3 | |
| | | | | | | | | options key which it relates to is :foreign_key | |||||
* | | Should save without validation if autosave is enabled. | Emilio Tagua | 2010-12-20 | 1 | -2/+4 | |
| | | ||||||
* | | Merge remote branch 'rails/master' into identity_map | Emilio Tagua | 2010-12-20 | 1 | -12/+10 | |
|\| | | | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations/association_proxy.rb activerecord/lib/active_record/autosave_association.rb activerecord/lib/active_record/base.rb activerecord/lib/active_record/persistence.rb | |||||
| * | Only call save on belongs_to associations if the record has changed or any ↵ | Chiel Wester | 2010-12-16 | 1 | -1/+1 | |
| | | | | | | | | | | | | nested associations have changed (resolves #3353) Signed-off-by: José Valim <jose.valim@gmail.com> | |||||
| * | Partialy revert f1c13b0dd7b22b5f6289ca1a09f1d7a8c7c8584b | José Valim | 2010-11-28 | 1 | -7/+7 | |
| | | ||||||
| * | fix typo | Ray Baxter | 2010-11-22 | 1 | -1/+1 | |
| | | ||||||
* | | Remove associated records from identity map if any raised an unexpected ↵ | Emilio Tagua | 2010-11-19 | 1 | -14/+19 | |
| | | | | | | | | exception. | |||||
* | | Looping prevention for autosave relations on validation and creation | Marcin Raczkowski | 2010-11-19 | 1 | -3/+20 | |
|/ | ||||||
* | use persisted? instead of new_record? wherever possible | David Chelimsky | 2010-11-09 | 1 | -7/+7 | |
| | | | | | | | | | | | - 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 | -2/+2 | |
| | | | | 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. | |||||
* | has_one maintains the association with separate after_create/after_update | Xavier Noria | 2010-10-22 | 1 | -1/+10 | |
| | | | | | This way parent models can get their own after_create and after_update callbacks fired after has_one has done its job. | |||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 1 | -5/+5 | |
| | | | | '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. | |||||
* | be more precise re :validate and :autosave | Xavier Noria | 2010-08-12 | 1 | -2/+1 | |
| | ||||||
* | revises some autosave docs, style and content | Xavier Noria | 2010-08-12 | 1 | -57/+22 | |
| | ||||||
* | applied guidelines to "# =>" | Paco Guzman | 2010-08-12 | 1 | -5/+5 | |
| | ||||||
* | adding more documentation for autosave option | Neeraj Singh | 2010-08-09 | 1 | -13/+37 | |
| | ||||||
* | adding the missing closing tag | Neeraj Singh | 2010-07-31 | 1 | -1/+1 | |
| | ||||||
* | fixing documentation just a little bit | Neeraj Singh | 2010-07-31 | 1 | -20/+14 | |
| | ||||||
* | Removing unnecessary code [#5192 state:resolved] | Thiago Pradi | 2010-07-26 | 1 | -4/+0 | |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | |||||
* | Revert "save on parent should not cascade to child unless child changed ↵ | José Valim | 2010-07-21 | 1 | -3/+1 | |
| | | | | | | | | [#3353 state:open]" Please check Lighthouse for more information. This reverts commit 4a0d7c1a439c6ad8d35bf514761824e51fa07df2. | |||||
* | save on parent should not cascade to child unless child changed [#3353 ↵ | Subba Rao Pasupuleti | 2010-07-18 | 1 | -1/+3 | |
| | | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | |||||
* | Add module_eval missing file_name and line_number args [#4712 state:resolved] | Evgeniy Dolzhenko | 2010-06-26 | 1 | -2/+2 | |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | |||||
* | Adds title and basic description where needed. | Rizwan Reza | 2010-06-15 | 1 | -0/+2 | |
| | ||||||
* | Fix a bunch of minor spelling mistakes | Evgeniy Dolzhenko | 2010-06-11 | 1 | -1/+1 | |
| | ||||||
* | Make the logic for nested_records_changed_for_autosave? simpler. | José Valim | 2010-06-07 | 1 | -9/+5 | |
| | | | | [#4648 state:resolved] | |||||
* | Fixing test class names and refactor line in autosave association | Carlos Antonio da Silva | 2010-06-07 | 1 | -1/+1 | |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | |||||
* | Nested records (re: autosave) are now updated even when the intermediate ↵ | Ian White | 2010-05-18 | 1 | -1/+22 | |
| | | | | | | parent record is unchanged [#4242 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | |||||
* | eliminate alias_method_chain from ActiveRecord | wycats | 2010-05-09 | 1 | -4/+2 | |
| | ||||||
* | save(false) is gone, use save(:validate => false) instead. | José Valim | 2010-01-17 | 1 | -5/+5 | |
| | ||||||
* | Different nested validations should not be ignore [#3638 status:resolved] | José Valim | 2010-01-14 | 1 | -1/+2 | |
| | ||||||
* | Renamed AssociationReflection #collection_association? to #collection?. | Eloy Duran | 2010-01-08 | 1 | -1/+1 | |
| | ||||||
* | Rollback the transaction when one of the autosave associations fails to ↵ | Eloy Duran | 2010-01-08 | 1 | -4/+10 | |
| | | | | save. [#3391 state:resolved] | |||||
* | Exclude unchanged records from the collection being considered for autosave. ↵ | Lawrence Pit | 2010-01-08 | 1 | -3/+3 | |
| | | | | | | [#2578 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> |