Marnen Laibow-Koser wrote in post #955575:
>
> If the Tattler plugin works with Rails 3 (which I'm not sure of), you
> might want to use it to make sure that Rails thinks it's rendering the
> partials.
>
Tattler seems not to work but I found this in a post referring to it:
Tattler doesn't work with Rails 3 anymore. This little bit of code,
inspired by it, does.
unless Rails.env.production?
class ActionView::Template
def render_with_comment(*args, &block)
render_result = render_without_comment(*args, &block)
if mime_type.nil? || mime_type === [Mime::HTML, Mime::XML]
("<!-- TEMPLATE: #{identifier} -->\n" +
render_result +
"\n<!-- ENDTEMPLATE: #{identifier} -->"
).html_safe
else
render_result
end
end
alias_method_chain :render, :comment
end
end
I added the snippet given above to a file in config/initializers called
tattler.rb. However, it does not work. I get a stack trace when I run
cucumber against the feature that previously simply failed.
http://gist.github.com/635417
So, I am no further ahead. I looked into one of the missing partials.
I do not notice anything obviously wrong. The code is here:
http://gist.github.com/635423
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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/rubyonrails-talk?hl=en.