move helper to new module
This commit is contained in:
parent
0a6e0ab514
commit
45ad8e6524
2 changed files with 13 additions and 10 deletions
|
@ -204,14 +204,4 @@ module ApplicationHelper
|
|||
end
|
||||
end
|
||||
|
||||
# provide input_html for password autocompletion
|
||||
def autocomplete_flag_to_password_html(password_autocomplete)
|
||||
case password_autocomplete
|
||||
when true then {autocomplete: 'on'}
|
||||
when false then {autocomplete: 'off'}
|
||||
when 'store-only' then {autocomplete: 'off', data: {store: 'on'}}
|
||||
else {}
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
13
app/helpers/shared_helper.rb
Normal file
13
app/helpers/shared_helper.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
module SharedHelper
|
||||
|
||||
# provide input_html for password autocompletion
|
||||
def autocomplete_flag_to_password_html(password_autocomplete)
|
||||
case password_autocomplete
|
||||
when true then {autocomplete: 'on'}
|
||||
when false then {autocomplete: 'off'}
|
||||
when 'store-only' then {autocomplete: 'off', data: {store: 'on'}}
|
||||
else {}
|
||||
end
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in a new issue