aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema/schema.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #560 from guilleiguaran/fix_pluralize_table_names_falseJon Leighton2011-05-161-0/+4
|\ | | | | Fixing has_many when ActiveRecord::Base.pluralize_table_names is false
| * Fixing has_many association when ActiveRecord::Base.pluralize_table_names is ↵Guillermo Iguaran2011-05-151-0/+4
| | | | | | | | false. fixes #557
* | CollectionAssociation#merge_target_lists should write to the underlying ↵Jon Leighton2011-05-141-0/+1
|/ | | | attributes when copying, rather than using the assignment method
* Add test to specify that attributes from an association's conditions should ↵Jon Leighton2011-05-101-0/+1
| | | | be assigned without mass-assignment protection when a record is built on the association.
* Don't quote ID's as Arel will quote them -- follow same conventions as the ↵Christopher Meiklejohn2011-05-081-0/+6
| | | | delete method.
* singular and collection relations in AR can now specify mass-assignment ↵Josh Kalderimis2011-05-011-0/+2
| | | | security options (:as and :without_protection) in build, create and create! methods.
* using the database adapter to typecast before executing prepared statementAaron Patterson2011-04-141-0/+1
|
* Allow to read and write AR attributes with non valid identifiersSantiago Pastorino2011-03-221-0/+3
|
* Merge branch 'master' into nested_has_many_throughJon Leighton2011-03-041-0/+28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/class_methods/join_dependency.rb activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb activerecord/lib/active_record/associations/has_many_association.rb activerecord/lib/active_record/associations/has_many_through_association.rb activerecord/lib/active_record/associations/has_one_association.rb activerecord/lib/active_record/associations/has_one_through_association.rb activerecord/lib/active_record/associations/through_association_scope.rb activerecord/lib/active_record/reflection.rb activerecord/test/cases/associations/has_many_through_associations_test.rb activerecord/test/cases/associations/has_one_through_associations_test.rb activerecord/test/cases/reflection_test.rb activerecord/test/cases/relations_test.rb activerecord/test/fixtures/memberships.yml activerecord/test/models/categorization.rb activerecord/test/models/category.rb activerecord/test/models/member.rb activerecord/test/models/reference.rb activerecord/test/models/tagging.rb
| * The optimistic lock column should be increased when calling touchFranck Verrot2011-02-091-0/+1
| | | | | | | | Signed-off-by: Santiago Pastorino and José Ignacio Costa <santiago+jose@wyeworks.com>
| * make set_table_name take effect immediatelyJan2011-02-081-0/+4
| |
| * Correctly update counter caches on deletion for has_many :through [#2824 ↵Jon Leighton2011-02-071-0/+4
| | | | | | | | state:resolved]. Also fixed a bunch of other counter cache bugs in the process, as once I fixed this one others started appearing like nobody's business.
| * Support the :dependent option on has_many :through associations. For ↵Jon Leighton2011-02-071-0/+1
| | | | | | | | historical and practical reasons, :delete_all is the default deletion strategy employed by association.delete(*records), despite the fact that the default strategy is :nullify for regular has_many. Also, this only works at all if the source reflection is a belongs_to. For other situations, you should directly modify the through association.
| * Fixing ordering of HABTM association deletion [#6191 state:resolved]Edward Faulkner2011-02-041-0/+13
| | | | | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
| * Add create_association! for belongs_toJon Leighton2011-01-161-0/+1
| |
| * Support for :counter_cache on polymorphic belongs_toJon Leighton2010-12-311-0/+1
| |
| * Fix creation of has_many through records with custom primary_key option on ↵Szymon Nowak2010-12-231-0/+1
| | | | | | | | belongs_to [#2990 state:resolved]
| * has_many associations with :dependent => :delete_all should update the ↵Jon Leighton2010-12-201-0/+1
| | | | | | | | counter cache when deleting records
| * Verify that creating a has_many through record where there is a ↵Jon Leighton2010-12-161-0/+1
| | | | | | | | default_scope on the join model works correctly (creates the join record with the default scope applied)
* | Merge branch 'master' into nested_has_many_throughJon Leighton2010-11-081-0/+1
|\| | | | | | | | | Conflicts: activerecord/lib/active_record/associations.rb
| * Add timestamps to TopicPratik Naik2010-11-021-0/+1
| |
* | Merge branch 'master' into nested_has_many_throughJon Leighton2010-10-281-52/+61
|\| | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/test/schema/schema.rb
| * made a pass in AR's schema.rb to keep (most) create statements in ↵Xavier Noria2010-10-221-59/+60
| | | | | | | | lexicographic order, and fixed an FK
| * has_one maintains the association with separate after_create/after_updateXavier Noria2010-10-221-0/+8
| | | | | | | | | | This way parent models can get their own after_create and after_update callbacks fired after has_one has done its job.
* | Support the :primary_key option on a through reflection in a nested through ↵Jon Leighton2010-10-191-0/+2
| | | | | | | | association
* | Support for :primary_key option on the source reflection of a through ↵Jon Leighton2010-10-191-2/+3
| | | | | | | | association, where the source is a has_one or has_many
* | Respect the :primary_key option on the through_reflection of (non-nested) ↵Jon Leighton2010-10-191-0/+2
| | | | | | | | through associations
* | Properly support conditions on any of the reflections involved in a nested ↵Jon Leighton2010-10-191-0/+1
| | | | | | | | through association
* | Add test_has_one_through_has_one_through_with_belongs_to_source_reflectionJon Leighton2010-10-141-0/+1
| |
* | Add support for nested through associations in JoinAssociation. Hence ↵Jon Leighton2010-10-091-0/+5
| | | | | | | | Foo.joins(:bar) will work for through associations. There is some duplicated code now, which will be refactored.
* | Initial nested_has_many_through support [#1152]Bodaniel Jeanes2010-09-261-0/+1
|/
* A few schema changes for the SQL Server adapter.Ken Collins2010-09-031-3/+3
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* While creating a new record using has_many create method default scope of ↵Neeraj Singh2010-08-191-0/+5
| | | | | | | | | | | child should be respected. author.posts.create should take into account default_scope defined on post. [#3939: state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Both tests are using the same model, move the model to another file and add ↵Santiago Pastorino2010-08-141-1/+1
| | | | the missing require
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-3/+3
| | | | 's/[ \t]*$//' -i {} \;)
* Ensure we can nest include calls [#5285 state:resolved]Neeraj Singh2010-08-121-0/+4
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Eager loading an association should not change the count of childrenNeeraj Singh2010-08-021-0/+13
| | | | | | [#4971 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* added failing touch propagation testJakub Kuźma2010-08-021-0/+2
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* update_attribute should not update readonly attributesNeeraj Singh2010-07-211-0/+1
| | | | | | [#5106 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Timestamp columns of HABTM join table should record timestampsNeeraj Singh2010-07-211-0/+2
| | | | [#5161 state:resolved]
* Ensure that primary_keys of HABTM records is not double quotedNeeraj Singh2010-07-201-0/+13
| | | | [#5152 state:reslved]
* string IDs are now quoted correctly [#5064 state:resolved]Will St. Clair + Neeraj Singh2010-07-131-0/+17
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* reset_counter should work with non-traditional belongs_to and polymorphic ↵Neeraj Singh2010-07-081-0/+13
| | | | | | | | belongs_to [#4984 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* adding column named 'group' to ensure that nothing breaks given that 'group' ↵Neeraj Singh2010-06-231-0/+1
| | | | | | | | is sql reserved word [#4945 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Support fixtures for namespaced models [#2965 state:resolved]Andrew White2010-04-251-0/+9
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Refactor compute_type to handle situations where the correct class is ↵Andrew White2010-04-121-0/+14
| | | | | | already loaded Signed-off-by: wycats <wycats@gmail.com>
* Add failing test that triggers the stack overflowBryan Stearns2010-01-081-0/+10
|
* Add inverse polymorphic association support. [#3520 state:resolved]George Ogata2009-12-281-0/+4
| | | | Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
* Revert "Revert "Assert primary key does not exist in habtm when the ↵Jeremy Kemper2009-11-231-1/+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
* Fix has_one with foreign_key and primary_key association bug which caused ↵Graeme Porteous2009-09-121-0/+1
| | | | | | | | the associated object being lost when saving the owner. [#1756 state:resolved] Mixed in a bit from patch by ransom-briggs. [#2813 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>