Simple_form disable html5

Hello,

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?

Thanks.

No solutions :(?

On Wednesday, May 25, 2011 6:07:24 AM UTC-6, Ruby-Forum.com User wrote:

No solutions :(?

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

http://groups.google.com/group/plataformatec-simpleform

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

https://github.com/plataformatec/simple_form/issues

That said, according to the main README of the gem:

https://github.com/plataformatec/simple_form (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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs