Well, I think I narrowed down what's going on. The snippet you posted
above (%input{:name => "search", :autofocus => true}) does work
correctly. However, something like the following does not work:%p= f.text_field :email, :autofocus => true Do the boolean attributes not work with form helpers? On May 12, 3:43 pm, Nathan Weizenbaum <[email protected]> wrote: > I don't know what to say, then, other than try uninstalling and > reinstalling. > > > > > > On Wed, May 12, 2010 at 2:51 PM, geetarista <[email protected]> wrote: > > I have this in my Gemfile: > > > gem 'haml', '3.0.2' > > > I also removed the old vendor/plugins/haml/init.rb. > > > On May 12, 2:42 pm, Nathan Weizenbaum <[email protected]> wrote: > > > The only thing I can think is that somehow your Rails app is using an > > > outdated version of Haml. How do you have it installed? > > > > On Wed, May 12, 2010 at 2:36 PM, geetarista <[email protected]> > > wrote: > > > > Something's wrong then. I have this line in config/initializers/ > > > > haml.rb: > > > > > Haml::Template.options[:format] = :html5 > > > > > My page outputs the correct doctype (<!DOCTYPE html>), but it's still > > > > putting it as autofocus='autofocus' for some reason. I wrote a passing > > > > test in the Haml repo, so there is nothing wrong with the library > > > > itself. > > > > > Is there something else I'm missing? > > > > > On May 12, 1:39 pm, Nathan Weizenbaum <[email protected]> wrote: > > > > > It only produces autofocus='autofocus' if you're using the XHTML > > output > > > > > format. If you use the HTML5 format, it will do what you want. > > > > > > On Wed, May 12, 2010 at 12:35 PM, geetarista <[email protected]> > > > > wrote: > > > > > > That produces the same thing as :autofocus => 'autofocus'. I was > > > > > > wondering if there would be support for Haml to output it without a > > > > > > value since it's unnecessary. I don't have a problem with using > > either > > > > > > method--I'm just bringing it up since I came across this in the > > HTML5 > > > > > > spec. > > > > > > > On May 12, 12:14 pm, Nathan Weizenbaum <[email protected]> wrote: > > > > > > > %input{:name => "search", :autofocus => true} > > > > > > > > On Wed, May 12, 2010 at 10:03 AM, geetarista < > > [email protected]> > > > > > > wrote: > > > > > > > > HTML5 has several naked attributes that do not require a value. > > One > > > > > > > > example is autofocus: > > > > > > > > > <input name="search" autofocus> > > > > > > > > > I know that for now I can work around this in Haml by using > > > > :autofocus > > > > > > > > => 'autofocus', but it would be nice to use the preferred > > method of > > > > > > > > using these attributes. Will there be support for this in > > future > > > > > > > > versions? > > > > > > > > > -- > > > > > > > > You received this message because you are subscribed to the > > Google > > > > > > Groups > > > > > > > > "Haml" group. > > > > > > > > To post to this group, send email to [email protected]. > > > > > > > > To unsubscribe from this group, send email to > > > > > > > > [email protected]<haml%[email protected]> > > <haml%[email protected]<haml%[email protected]> > > > > > <haml%[email protected]<haml%[email protected]> > > <haml%[email protected]<haml%25252bunsubscr...@googlegroups. > > com> > > > > > >< > > > > > > haml%[email protected]<haml%[email protected]> > > <haml%[email protected]<haml%25252bunsubscr...@googlegroups. > > com> > > > > > <haml%[email protected]<haml%25252bunsubscr...@googlegroups. > > > > com> > > <haml%25252bunsubscr...@googlegroups. com> > > > > > > > >. > > > > > > > > For more options, visit this group at > > > > > > > >http://groups.google.com/group/haml?hl=en. > > > > > > > > -- > > > > > > > You received this message because you are subscribed to the > > Google > > > > Groups > > > > > > "Haml" group. > > > > > > > To post to this group, send email to [email protected]. > > > > > > > To unsubscribe from this group, send email to > > > > > > [email protected]<haml%[email protected]> > > <haml%[email protected]<haml%[email protected]> > > >< > > > > haml%[email protected]<haml%[email protected]> > > <haml%[email protected]<haml%25252bunsubscr...@googlegroups. > > com> > > > > > >. > > > > > > > For more options, visit this group athttp:// > > > > > > groups.google.com/group/haml?hl=en. > > > > > > > -- > > > > > > You received this message because you are subscribed to the Google > > > > Groups > > > > > > "Haml" group. > > > > > > To post to this group, send email to [email protected]. > > > > > > To unsubscribe from this group, send email to > > > > > > [email protected]<haml%[email protected]> > > <haml%[email protected]<haml%[email protected]> > > >< > > > > haml%[email protected]<haml%[email protected]> > > <haml%[email protected]<haml%25252bunsubscr...@googlegroups. > > com> > > > > > >. > > > > > > For more options, visit this group at > > > > > >http://groups.google.com/group/haml?hl=en. > > > > > > -- > > > > > You received this message because you are subscribed to the Google > > Groups > > > > "Haml" group. > > > > > To post to this group, send email to [email protected]. > > > > > To unsubscribe from this group, send email to > > > > [email protected]<haml%[email protected]>< > > haml%[email protected]<haml%[email protected]> > > >. > > > > > For more options, visit this group athttp:// > > > > groups.google.com/group/haml?hl=en. > > > > > -- > > > > You received this message because you are subscribed to the Google > > Groups > > > > "Haml" group. > > > > To post to this group, send email to [email protected]. > > > > To unsubscribe from this group, send email to > > > > [email protected]<haml%[email protected]>< > > haml%[email protected]<haml%[email protected]> > > >. > > > > For more options, visit this group at > > > >http://groups.google.com/group/haml?hl=en. > > > > -- > > > You received this message because you are subscribed to the Google Groups > > "Haml" group. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > > [email protected] <haml%[email protected]>. > > > For more options, visit this group athttp:// > > groups.google.com/group/haml?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Haml" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected] <haml%[email protected]>. > > For more options, visit this group at > >http://groups.google.com/group/haml?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Haml" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/haml?hl=en. -- You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/haml?hl=en.
