Skip to content

Instantly share code, notes, and snippets.

@bltavares
Created July 1, 2011 20:21
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save bltavares/1059315 to your computer and use it in GitHub Desktop.
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