Tracing through Rails partials29 Sep 08

Looking at HTML source, it can be hard to figure out which partial is generating bad code, and why. This code outputs HTML comments at the start and end of partial rendering, giving the path to the partial and the objects and locals that were passed to it.

script/plugin install git://github.com/gwynm/noisy_partials.git

khelll said on 30 Sep 2008:

Well, i had to change line 6 in lib/nosie_partials.rb
to make it accept nill values as follows :
start_explanation + render_partial_without_explanation(*args).to_s + end_explanation

Gwyn said on 01 Oct 2008:

Ooh, good catch. Fixed.




Gwyn Morfey — facebookflickrtumblr — London UK