foodsoft/app/helpers/shared_helper.rb
2013-12-23 11:48:17 +01:00

13 lines
358 B
Ruby

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