diff options
author | David Cabo <david@calibea.com> | 2011-08-09 18:52:15 +0200 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-08-11 15:01:24 +0100 |
commit | 4713ad8cfde9b37befdf8c9cac3f26da0997786a (patch) | |
tree | f2d0fa0c98725951fd36efec50d47e6b54a9aed9 /app/controllers/admin_public_body_controller.rb | |
parent | b4af048ec41048c1dd05a6b5445d5e357ba4444a (diff) |
Create public bodies in multiple locales when importing from CSV
Diffstat (limited to 'app/controllers/admin_public_body_controller.rb')
-rw-r--r-- | app/controllers/admin_public_body_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/admin_public_body_controller.rb b/app/controllers/admin_public_body_controller.rb index f88b25572..021122734 100644 --- a/app/controllers/admin_public_body_controller.rb +++ b/app/controllers/admin_public_body_controller.rb @@ -154,10 +154,10 @@ class AdminPublicBodyController < AdminController else raise "internal error, unknown button label" end - + # Try with dry run first csv_contents = params[:csv_file].read - en = PublicBody.import_csv(csv_contents, params[:tag], true, admin_http_auth_user()) + en = PublicBody.import_csv(csv_contents, params[:tag], true, admin_http_auth_user(), I18n.available_locales) errors = en[0] notes = en[1] @@ -166,7 +166,7 @@ class AdminPublicBodyController < AdminController notes.push("Dry run was successful, real run would do as above.") else # And if OK, with real run - en = PublicBody.import_csv(csv_contents, params[:tag], false, admin_http_auth_user()) + en = PublicBody.import_csv(csv_contents, params[:tag], false, admin_http_auth_user(), available_locales) errors = en[0] notes = en[1] if errors.size != 0 |