foodsoft/app/helpers/shared_helper.rb

14 lines
358 B
Ruby
Raw Normal View History

2013-12-23 11:48:06 +01:00
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