Fix the jquery-ui datepicker i18n files' asset compilation

This commit is contained in:
Jyri-Petteri Paloposki 2021-01-05 19:29:36 +02:00
parent da4f662aae
commit e1be3b8a95
3 changed files with 17 additions and 9 deletions

View file

@ -20,6 +20,14 @@
//= require jquery-ui/widgets/droppable //= require jquery-ui/widgets/droppable
//= require jquery-ui/effects/effect-highlight //= require jquery-ui/effects/effect-highlight
//= require jquery-ui/widgets/sortable //= require jquery-ui/widgets/sortable
//= require jquery-ui/i18n/datepicker-cs
//= require jquery-ui/i18n/datepicker-de
//= require jquery-ui/i18n/datepicker-es
//= require jquery-ui/i18n/datepicker-fi
//= require jquery-ui/i18n/datepicker-fr
//= require jquery-ui/i18n/datepicker-he
//= require jquery-ui/i18n/datepicker-nl
//= require jquery-ui/i18n/datepicker-ru
// Stuff in app/assets // Stuff in app/assets
//= require tracks //= require tracks

View file

@ -165,11 +165,11 @@ module ApplicationHelper
end end
def javascript_tag_for_i18n_datepicker def javascript_tag_for_i18n_datepicker
locale = I18n.locale # locale = I18n.locale
# do not include en as locale since this the available by default # do not include en as locale since this the available by default
if locale && locale != :en # if locale && locale != :en
javascript_include_tag("jquery-ui/datepicker-#{locale}") # javascript_include_tag("jquery-ui/i18n/datepicker-#{locale}")
end # end
end end
def done_path(controller_name, type) def done_path(controller_name, type)

View file

@ -6,16 +6,16 @@ class TodosControllerTest < ActionController::TestCase
assert_redirected_to login_url assert_redirected_to login_url
end end
############################
# not done / deferred counts
############################
def test_locale_index def test_locale_index
login_as(:other_user_email) login_as(:other_user_email)
get :index get :index
asser_response 200 assert_response 200
end end
############################
# not done / deferred counts
############################
def test_not_done_counts def test_not_done_counts
login_as(:admin_user) login_as(:admin_user)
get :index get :index