rails--rails/activerecord/test/fixtures
Andrew White 46492949b8 Improve the derivation of HABTM assocation join table names
Improve the derivation of HABTM join table name to take account of nesting.
It now takes the table names of the two models, sorts them lexically and
then joins them, stripping any common prefix from the second table name.

Some examples:

  Top level models
  (Category <=> Product)
  Old: categories_products
  New: categories_products

  Top level models with a global table_name_prefix
  (Category <=> Product)
  Old: site_categories_products
  New: site_categories_products

  Nested models in a module without a table_name_prefix method
  (Admin::Category <=> Admin::Product)
  Old: categories_products
  New: categories_products

  Nested models in a module with a table_name_prefix method
  (Admin::Category <=> Admin::Product)
  Old: categories_products
  New: admin_categories_products

  Nested models in a parent model
  (Catalog::Category <=> Catalog::Product)
  Old: categories_products
  New: catalog_categories_products

  Nested models in different parent models
  (Catalog::Category <=> Content::Page)
  Old: categories_pages
  New: catalog_categories_content_pages

Also as part of this commit the validity checks for HABTM assocations have
been moved to ActiveRecord::Reflection One side effect of this is to move when
the exceptions are raised from the point of declaration to when the association
is built. This is consistant with other association validity checks.
2012-06-22 06:27:11 +01:00
..
admin
all
categories
naked
reserved_words
.gitignore
accounts.yml
author_addresses.yml
author_favorites.yml
authors.yml
binaries.yml
books.yml
cars.yml
categories.yml
categories_ordered.yml
categories_posts.yml
categorizations.yml
clubs.yml
collections.yml
colleges.yml
comments.yml
companies.yml
computers.yml
courses.yml
customers.yml
dashboards.yml
developers.yml
developers_projects.yml
dog_lovers.yml
dogs.yml
edges.yml
entrants.yml
essays.yml
faces.yml
fk_test_has_fk.yml
fk_test_has_pk.yml
funny_jokes.yml
interests.yml
items.yml
jobs.yml
legacy_things.yml
mateys.yml
member_details.yml
member_types.yml
members.yml
memberships.yml
men.yml
minimalistics.yml
minivans.yml
mixed_case_monkeys.yml
mixins.yml
movies.yml
organizations.yml
other_topics.yml
owners.yml
parrots.yml
parrots_pirates.yml
people.yml
peoples_treasures.yml
pets.yml
pirates.yml
posts.yml
price_estimates.yml
products.yml
projects.yml
randomly_named_a9.yml
ratings.yml
readers.yml
references.yml
ships.yml
speedometers.yml
sponsors.yml
string_key_objects.yml
subscribers.yml
subscriptions.yml
taggings.yml
tags.yml
tasks.yml
teapots.yml
topics.yml
toys.yml
traffic_lights.yml
treasures.yml
variants.yml
vertices.yml
warehouse-things.yml
zines.yml