| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Fix associations with per-class/multiple database connections
|
| | |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* joelhoffman-postgres_schema_builder:
Also support writing the hstore back to the database
Hstore values are all strings
string_to_hstore / hstore_to_string, serializing
don't test schema where hstore not installed
schema dumper tests for hstore
Additional hstore tests, supporting null values, better compliance with postgres docs
add hstore to postgres native types and defaults
Conflicts:
activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
Remove extra attributes from HABTM join tables in AR tests
|
|
|
|
|
|
|
|
| |
If a model belongs_to two associations with the same class, then reset_counters
will reset the wrong counter cache.
Finding the right reflection should use the foreign_key instead, which should
be unique.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Test using fixtures with random names and model names, that is not following naming conventions but using set_fixture_class instead.
It is expected that the table name be defined in the model, but this is not explicitly tested here. This will need to be fixed.
|
| |
| |
| |
| |
| | |
This is the 'top level' connection, inherited by any models that include
ActiveRecord::Model or inherit from ActiveRecord::Base.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
stores [DHH]
|
| |
| |
| |
| | |
case sensitive collation.
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
| |
destoyed without catching the ActiveRecord::StaleObjectError.
|
| |
|
|\
| |
| | |
ActiveRecord::Base subclasses should pass ActiveModel::Lint.
|
| | |
|
|/
|
|
| |
issue #402.
|
|\
| |
| | |
Fixing has_many when ActiveRecord::Base.pluralize_table_names is false
|
| |
| |
| |
| | |
false. fixes #557
|
|/
|
|
| |
attributes when copying, rather than using the assignment method
|
|
|
|
| |
be assigned without mass-assignment protection when a record is built on the association.
|
|
|
|
| |
delete method.
|
|
|
|
| |
security options (:as and :without_protection) in build, create and create! methods.
|
|
|
| |
Applied Patch from https://rails.lighthouseapp.com/projects/8994/tickets/5577-suport-from-tsvector-data-type-in-postgresql
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| | |
Signed-off-by: Santiago Pastorino and José Ignacio Costa <santiago+jose@wyeworks.com>
|
| | |
|
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
| | |
|
| | |
|
| |
| |
| |
| | |
belongs_to [#2990 state:resolved]
|
| |
| |
| |
| | |
counter cache when deleting records
|
| |
| |
| |
| | |
default_scope on the join model works correctly (creates the join record with the default scope applied)
|
|\|
| |
| |
| |
| | |
Conflicts:
activerecord/lib/active_record/associations.rb
|
| | |
|
|\|
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
activerecord/CHANGELOG
activerecord/lib/active_record/association_preload.rb
activerecord/lib/active_record/associations.rb
activerecord/test/schema/schema.rb
|
| |
| |
| |
| | |
lexicographic order, and fixed an FK
|
| |
| |
| |
| |
| | |
This way parent models can get their own after_create and
after_update callbacks fired after has_one has done its job.
|