simple_form disable html5


How do I disable html5 with simple_form gem?

I tried to type:

SimpleForm.html5 = false

in environment.rb

But this throws error.

undefined method `html5=' for SimpleForm:Module (NoMethodError)

Even though I see...

module SimpleForm ...   mattr_accessor :html5   @@html5 = true ... end

Any explanation on this? How I can disable it in any other ways?


No solutions :(?

Since this is a SimpleForm specific question, you ought to consider asking it on its own group:

If the gem has a bug, you can report it to:

That said, according to the main README of the gem: (toward the bottom)

…it says you can use: SimpleForm.html5 = false

So, that part is correct. However, you should be putting (you’re on rails 3, yes?) your initialization in an initializer file instead of config/environment.rb. I’d try sticking that line in its own file such as:

$ cat config/initializers/disable_html5.rb

Disable HTML5 for the SimpleForm gem…

SimpleForm.html5 = false