I'm under the impression that this is how it should be done these days: - foo.each do |bar| %p= bar
= form_for :foo do |f| = f.text_field :bar The difference is that `form_for` represents a form tag (among other semantics) while `each` doesn't represent an HTML entity. Please (!!) correct me if I'm wrong. :brad On Wed, Jul 7, 2010 at 10:17 PM, Bryce Thornton <[email protected]>wrote: > I'm a bit confused about the deprecated block helpers in haml3. I get > this warning: > > DEPRECATION WARNING: - style block helpers are deprecated. Please use > =. > > When I go to use "=" instead of "-" I can't get it to work the way I > expect. It seems to always output the return value of the block once > it completes. > > Here's an example: > > statuses = ['foo','bar'] > > = statuses.each do |status| > = status > > This will output "foo bar foobar" whereas it will properly output "foo > bar" when using the "deprecated" style. Can someone explain this new > block helper format? > > Thanks! > > -- > 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. > > -- Bradley Grzesiak co-founder, bendyworks llc http://bendyworks.com/ -- 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.
