Re: [haml] Undefined method `children' for nil:NilClass since the update to Haml 3.1

2011-05-11 Thread chadoh
Oh, good. I'm glad to hear it's not my fault! Thanks for the timely reply.

-- 
You received this message because you are subscribed to the Google Groups 
Haml group.
To post to this group, send email to haml@googlegroups.com.
To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.



[haml] Undefined method `children' for nil:NilClass since the update to Haml 3.1

2011-05-10 Thread chadoh
*Background info:*
I am working my way through Crafting 
Railshttp://pragprog.com/titles/jvrails/crafting-rails-applications and 
in Chapter 4 I made a handler for merb templates—markdown with erb 
interspersed. This can be compiled into text or html, so it's perfect for 
mail. My new_submission Notification email has one template in 
app/views/notifications/new_submission.merb. Then in 
app/mailers/notifications.rb, all you need to do is

mail(:to = Person.editor.email) do |format|
  format.text
  format.html
end

And the single .merb template gets compiled into both the text and html part 
of a multipart email. Woohoo! You can read more about this in an excerpt 
from Crafting Rails http://media.pragprog.com/titles/jvrails/emails.pdf, 
and you can browse around my specific implementation of 
ithttps://github.com/chadoh/handlers
.

*Somewhere, somehow, something went wrong*
I updated my Gemfile about a week ago, and thought I got everything working 
because my pages were loading and Compass and Sass were no longer grumbling 
at me. For some horrible reason I didn't run any of my tests. But it turns 
out I've been getting this error since then whenever I call an action (such 
as packlet.destroy) that tries to send this new_submission email:

ActionView::Template::Error (undefined method `children' for nil:NilClass):
  app/mailers/notifications.rb:25:in `block in new_submission'
  app/mailers/notifications.rb:23:in `new_submission'
  app/models/submission.rb:62:in `has_been'
  app/models/packlet.rb:20:in `destroy'
  app/controllers/packlets_controller.rb:27:in `destroy'

Line 26 of app/mailers/notifications is the format.html line, shown above.

I have narrowed this down to a problem with haml/sass 3.1 by doing this 
bundle update more granularly. I updated Rails, ran my tests, no problems. I 
updated haml, ran my tests, and this pops out in four places.

Any guidance would be greatly appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
Haml group.
To post to this group, send email to haml@googlegroups.com.
To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.



Re: [haml] Undefined method `children' for nil:NilClass since the update to Haml 3.1

2011-05-10 Thread Nathan Weizenbaum
This is a known bug in Haml 3.1, caused by nesting content within comments.
A fix should be forthcoming soon.

On Tue, May 10, 2011 at 5:28 AM, chadoh chad.ostrow...@gmail.com wrote:

 *Background info:*
 I am working my way through Crafting 
 Railshttp://pragprog.com/titles/jvrails/crafting-rails-applications and
 in Chapter 4 I made a handler for merb templates—markdown with erb
 interspersed. This can be compiled into text or html, so it's perfect for
 mail. My new_submission Notification email has one template in
 app/views/notifications/new_submission.merb. Then in
 app/mailers/notifications.rb, all you need to do is

 mail(:to = Person.editor.email) do |format|
   format.text
   format.html
 end

 And the single .merb template gets compiled into both the text and html
 part of a multipart email. Woohoo! You can read more about this in an
 excerpt from Crafting 
 Railshttp://media.pragprog.com/titles/jvrails/emails.pdf,
 and you can browse around my specific implementation of 
 ithttps://github.com/chadoh/handlers
 .

 *Somewhere, somehow, something went wrong*
 I updated my Gemfile about a week ago, and thought I got everything working
 because my pages were loading and Compass and Sass were no longer grumbling
 at me. For some horrible reason I didn't run any of my tests. But it turns
 out I've been getting this error since then whenever I call an action (such
 as packlet.destroy) that tries to send this new_submission email:

 ActionView::Template::Error (undefined method `children' for nil:NilClass):
   app/mailers/notifications.rb:25:in `block in new_submission'
   app/mailers/notifications.rb:23:in `new_submission'
   app/models/submission.rb:62:in `has_been'
   app/models/packlet.rb:20:in `destroy'
   app/controllers/packlets_controller.rb:27:in `destroy'

 Line 26 of app/mailers/notifications is the format.html line, shown
 above.

 I have narrowed this down to a problem with haml/sass 3.1 by doing this
 bundle update more granularly. I updated Rails, ran my tests, no problems. I
 updated haml, ran my tests, and this pops out in four places.

 Any guidance would be greatly appreciated.

 --
 You received this message because you are subscribed to the Google Groups
 Haml group.
 To post to this group, send email to haml@googlegroups.com.
 To unsubscribe from this group, send email to
 haml+unsubscr...@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 haml@googlegroups.com.
To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.