Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Changed a few instances of of words in the API docs written in British ↵ | Oemuer Oezkir | 2011-07-24 | 1 | -1/+1 | |
| | | | | | | English to American English(according to Weber) | |||||
* | Fix exception if old and new targets are both nil. Fixes #1471. | Jon Leighton | 2011-07-12 | 1 | -1/+1 | |
| | ||||||
* | Merge branch 'master' of git://github.com/lifo/docrails | Xavier Noria | 2011-07-09 | 1 | -1/+1 | |
|\ | ||||||
| * | find(:first) => first | Akira Matsuda | 2011-07-08 | 1 | -1/+1 | |
| | | ||||||
* | | Destroy association habtm record before destroying the record itself. Fixes ↵ | Tomas D'Stefano | 2011-07-08 | 1 | -12/+10 | |
| | | | | | | | | issue #402. | |||||
* | | Ensure that the foreign key gets set when doing record.create_association or ↵ | Jon Leighton | 2011-07-08 | 1 | -2/+11 | |
| | | | | | | | | record.create_association. Fixes #1960. | |||||
* | | Merge pull request #1120 from lysenko/collection_singular_ids | Santiago Pastorino | 2011-07-06 | 1 | -1/+1 | |
|\ \ | | | | | | | collection_singular_ids ignores association :include option | |||||
| * | | Fix bug in collection_singular_ids on has many through association with ↵ | Anatoliy Lysenko | 2011-07-06 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | conditions and includes, when condtions references tables from includes. Test fail because of invalid sql: ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column: comments.id: SELECT "posts".id FROM "posts" INNER JOIN "readers" ON "posts"."id" = "readers"."post_id" WHERE "readers"."person_id" = 1 AND (comments.id is null) Bug described in github#925 This commit will revert fix from https://github.com/rails/rails/commit/3436fdfc12d58925e3d981e0afa61084ea34736c , but tests is ok. Bug described in #6569 ticket. | |||||
* | | | Don't construct association scope in initializer. This yields a big ↵ | Jon Leighton | 2011-07-07 | 1 | -6/+10 | |
|/ / | | | | | | | performance gain for cases where the association is never used to load the target, for example with preloading. Related: #1873. | |||||
* | | Merge pull request #1968 from bogdan/associations_find_array_compatibility2 | Santiago Pastorino | 2011-07-05 | 1 | -3/+7 | |
|\ \ | |/ |/| | Fixed CollectionAssociation#find to be compatible with Array#find | |||||
| * | Fixed CollectionAssociation#find to be compatible with Array#find | Bogdan Gusiev | 2011-07-05 | 1 | -3/+7 | |
| | | | | | | | | | | In order to make CollectionAssociation behave closer to Array Add the ability to pass block to #find method just like Array#find does. | |||||
* | | Only call set_owner_attributes for has_one association if target exists. | Dieter Komendera | 2011-07-04 | 1 | -1/+1 | |
|/ | ||||||
* | a few minor performance improvements: fewer strings, fewer range objects, ↵ | Aaron Patterson | 2011-07-01 | 2 | -22/+13 | |
| | | | | fewer method calls | |||||
* | remove unused codes | Aaron Patterson | 2011-07-01 | 1 | -4/+0 | |
| | ||||||
* | reduce calls to owners_by_key and to read_attribute, respond_to? etc | Aaron Patterson | 2011-07-01 | 1 | -2/+3 | |
| | ||||||
* | Assign the association attributes to the associated record before the ↵ | Jon Leighton | 2011-06-30 | 3 | -8/+10 | |
| | | | | before_initialize callback of the record runs. Fixes #1842. | |||||
* | match method signature of the superclass | Aaron Patterson | 2011-06-30 | 1 | -3/+3 | |
| | ||||||
* | cache the plural name on the reflection so we do not pay pluralize costs on ↵ | Aaron Patterson | 2011-06-30 | 1 | -1/+1 | |
| | | | | joins | |||||
* | Replace inline lambdas with named methods | Jon Leighton | 2011-06-12 | 1 | -29/+42 | |
| | ||||||
* | Don't wrap operations on collection associations in transactions when they ↵ | benedikt | 2011-06-12 | 1 | -3/+9 | |
| | | | | are not needed, so the connection adapter does not send empty BEGIN COMMIT transactions blocks to the database. | |||||
* | remove warning: assigned but unused variable | Santiago Pastorino | 2011-06-08 | 1 | -1/+1 | |
| | ||||||
* | Allow polymorphic has_one to work when the association is set before the ↵ | Jon Leighton | 2011-06-08 | 1 | -3/+1 | |
| | | | | owner has been saved. Fixes #1524. | |||||
* | When you add a record to a polymorphic has_one, you should be able to access ↵ | Jon Leighton | 2011-06-08 | 2 | -2/+2 | |
| | | | | the owner from the associated record | |||||
* | Don't double assign attributes - closes #1467. | Andrew White | 2011-06-03 | 1 | -1/+0 | |
| | ||||||
* | added an alias for new to build to the AR collection proxy, this corrects an ↵ | Josh Kalderimis | 2011-06-01 | 2 | -10/+2 | |
| | | | | issue where the collection proxies were not consistent | |||||
* | Only save the record once when calling create! on a collection association. ↵ | Jon Leighton | 2011-05-31 | 4 | -25/+45 | |
| | | | | Fixes #1360. | |||||
* | Implementing @dmathieu's cleaner fix from #1425. Unfortunately he deleted ↵ | Jon Leighton | 2011-05-31 | 1 | -8/+5 | |
| | | | | the branch so I cannot just merge it. | |||||
* | Adding comment to work with 1.8.7. Nested Attribute fix. | Arun Agrawal | 2011-05-31 | 1 | -0/+3 | |
| | ||||||
* | Fix nested attribute for memory record. | Arun Agrawal | 2011-05-31 | 1 | -1/+5 | |
| | ||||||
* | Merge pull request #1323 from fx/association_primary_key | Jon Leighton | 2011-05-26 | 1 | -1/+1 | |
|\ | | | | | use association_primary_key in AssociationScope#add_constraints | |||||
| * | use association_primary_key in AssociationScope#add_constraints | Marian Rudzynski | 2011-05-26 | 1 | -1/+1 | |
| | | ||||||
* | | Removes the restriction on primary key when joining in a habtm && test that ↵ | Mohammad El-Abid | 2011-05-26 | 1 | -4/+0 | |
|/ | | | | it was properly removed | |||||
* | Merge branch 'master' of github.com:rails/rails | Xavier Noria | 2011-05-25 | 2 | -37/+0 | |
|\ | ||||||
| * | removed deprecated methods, and related tests, from ActiveRecord | Josh Kalderimis | 2011-05-25 | 2 | -37/+0 | |
| | | ||||||
* | | Merge branch 'master' of git://github.com/lifo/docrails | Xavier Noria | 2011-05-25 | 2 | -2/+2 | |
|\ \ | |/ |/| | | | | | | | Conflicts: actionmailer/lib/action_mailer/base.rb activesupport/lib/active_support/core_ext/kernel/requires.rb | |||||
| * | Remove extra white spaces on ActiveRecord docs. | Sebastian Martinez | 2011-05-23 | 2 | -2/+2 | |
| | | ||||||
* | | Ignore :includes on through associations | Andrew White | 2011-05-24 | 1 | -1/+1 | |
| | | ||||||
* | | Fix problem with loading polymorphic associations which have been defined in ↵ | Jon Leighton | 2011-05-22 | 2 | -8/+22 | |
| | | | | | | | | an abstract superclass. Fixes #552. | |||||
* | | Handle polymorphic_type NOT NULL-able columns as well. | thedarkone | 2011-05-21 | 1 | -1/+1 | |
| | | ||||||
* | | AliasTracker.pluralize use pluralize_table_names of model | Guillermo Iguaran | 2011-05-20 | 2 | -3/+3 | |
| | | ||||||
* | | Implement proxy_owner, proxy_target and proxy_reflection methods on ↵ | Jon Leighton | 2011-05-19 | 1 | -0/+24 | |
|/ | | | | CollectionProxy with deprecations. Fixes #1148. | |||||
* | Don't pass a block as we are yielding | Andrew White | 2011-05-17 | 1 | -1/+1 | |
| | ||||||
* | Add block setting of attributes to singular associations | Andrew White | 2011-05-17 | 2 | -11/+12 | |
| | ||||||
* | Pass the attribute and option hashes to build_association | Andrew White | 2011-05-17 | 2 | -8/+12 | |
| | | | | | | | The build_association method was added as an API for plugins to hook into in 1398db0. This commit restores this API and the ability to override class.new to return a subclass based on a virtual attribute in the attributes hash. | |||||
* | Merge pull request #560 from guilleiguaran/fix_pluralize_table_names_false | Jon Leighton | 2011-05-16 | 1 | -1/+1 | |
|\ | | | | | Fixing has_many when ActiveRecord::Base.pluralize_table_names is false | |||||
| * | Fixing has_many association when ActiveRecord::Base.pluralize_table_names is ↵ | Guillermo Iguaran | 2011-05-15 | 1 | -1/+1 | |
| | | | | | | | | false. fixes #557 | |||||
* | | These extra array operations appear to be unnecessary. Reasoning: | Jon Leighton | 2011-05-14 | 1 | -8/+2 | |
| | | | | | | | | | | * It is not necessary to subtract 'id' from the list of copied attributes because record and mem_record are equal, so therefore their id attributes are also equal (so there is no harm in copying it, and this reduces the complexity of the code) * It is not necessary to intersect the attribute names, since record and mem_record are equal, so they have the same id and class, so they have the same columns in the database. If record has non-column attributes then it seems reasonable to also copy them onto mem_record (though I am not sure what situation this would ever happen in) | |||||
* | | CollectionAssociation#merge_target_lists should write to the underlying ↵ | Jon Leighton | 2011-05-14 | 1 | -5/+2 | |
| | | | | | | | | attributes when copying, rather than using the assignment method | |||||
* | | An attempt to make CollectionAssociation#merge_target_lists make more sense. | Jon Leighton | 2011-05-14 | 1 | -16/+35 | |
|/ | ||||||
* | Instead of doing find(:all) which does scoped.find(:all) which does ↵ | Jon Leighton | 2011-05-13 | 1 | -1/+1 | |
| | | | | scoped.all, just do scoped.all. |