foodsoft/app/helpers/shared_helper.rb

12 lines
356 B
Ruby
Raw Permalink 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 {}
2013-12-23 11:48:06 +01:00
end
end
end