Use JavaScript pluralize for budget staff

We were using two different systems to set translations in JavaScript:
to set the text for languages, we were using data attributes, and to set
the text for staff members, we were using AJAX calls.

I find data attributes keep the code more simple, since there's no need
to define an extra route and controller action. Furthermore, the user
experience is better because response times are faster.

So now both places use data attributes.
This commit is contained in:
Javi Martín
2019-10-31 15:36:00 +01:00
parent 7b89dd6a5f
commit 6c323eaf3e
5 changed files with 8 additions and 28 deletions

View File

@@ -54,7 +54,6 @@ namespace :admin do
resources :budgets do
member do
put :calculate_winners
get :assigned_users_translation
end
resources :groups, except: [:show], controller: "budget_groups" do