Fix scope error

This commit is contained in:
Paul Chavard 2019-04-03 20:42:44 +02:00
parent c4ef6d89c9
commit 1cbd348569
2 changed files with 7 additions and 3 deletions

View file

@ -60,6 +60,12 @@ module ApplicationHelper
# rubocop:enable Rails/OutputSafety
end
def show_element(selector)
# rubocop:disable Rails/OutputSafety
raw("document.querySelector('#{selector}').classList.remove('hidden');")
# rubocop:enable Rails/OutputSafety
end
def disable_element(selector)
# rubocop:disable Rails/OutputSafety
raw("document.querySelector('#{selector}').disabled = true;")