Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Speech input on Simple_form
#app/inputs/speech_input.rb
class SpeechInput < SimpleForm::Inputs::Base
def input
input_html_options ||= {}
input_html_options.merge!({:"x-webkit-speech" => "", :speech => "", :lang => "en", :"x-webkit-grammar" =>"builtin:search"})
@builder.text_field(attribute_name, input_html_options)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.