Created
July 1, 2011 20:21
-
-
Save bltavares/1059315 to your computer and use it in GitHub Desktop.
Speech input on Simple_form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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