aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/services_controller_spec.rb
diff options
context:
space:
mode:
authorMark Longair <mhl@pobox.com>2014-01-03 16:52:04 +0000
committerMark Longair <mhl@pobox.com>2014-01-14 09:14:13 +0000
commitef0594552843014c32a7f2e75e7bcd7a1e265156 (patch)
treebc9b66414c485e3960e4c8617cac707820300813 /spec/controllers/services_controller_spec.rb
parent3e3b7a0d5a1401b18c88683581a545708c65aaf0 (diff)
Ignore translations when finding the internal admin body
If you change the default locale after having set up your site, and exception would always be thrown by PublicBody.internal_admin_body, which looks up that distinguished body based on url_name. Since that's a translated field, and there would be no translation for it in the new locale, it wouldn't be found, and the code would try to create a second internal_admin_body, which would fail because of the url_name being non-unque in public_bodies. There are various ways of fixing this; the one introduced in this commit is to use raw SQL to find the public body, bypassing the public_body_translations table. Fixes #1001.
Diffstat (limited to 'spec/controllers/services_controller_spec.rb')
0 files changed, 0 insertions, 0 deletions