aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods
diff options
context:
space:
mode:
authorAlexey Muranov <muranov@math.univ-toulouse.fr>2011-12-20 21:06:30 +0100
committerAlexey Muranov <alexey.muranov@gmail.com>2011-12-30 10:34:01 +0100
commite0ef0936193491689724880599ae26a8f5c2b5a6 (patch)
tree569f5625800f3907294335ffd1d00a48ee4c1111 /activerecord/lib/active_record/attribute_methods
parent6468ff41971b69be9c02f33d05e94e4f8845266b (diff)
downloadrails-e0ef0936193491689724880599ae26a8f5c2b5a6.tar.gz
rails-e0ef0936193491689724880599ae26a8f5c2b5a6.tar.bz2
rails-e0ef0936193491689724880599ae26a8f5c2b5a6.zip
Use foo/bar instead of foo_bar keys for fixtures
This solves an issue with set_fixture_class class method caused by create_fixtures method's overwriting passed to it fixture model classes, when the fixtures are "namespased": foo/bar or admin/users. The idea is to use "foo/bar" string as the name and identifier of a fixture file bar in directory foo. The model class of the fixture is either set with set_fixture_class method, or otherwise inferred from its name using camelize method. Also a bug is fixed in lines 487-489 when the table names were guessed by substitution from the fixture file names, ambiguously called table_names, instead of being taken from fixture attributes. Now they are taken from attributes. I plan to submit another fix so that the fixture's table name (for example foo_bar) be defined by the fixture's model whenever possible, instead of inferring it from the fixture's name ("foo/bar").
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods')
0 files changed, 0 insertions, 0 deletions