Double Render Error

I’ve been fighting with a Double Render Error.

I have some sidebar partials that I render to strings in my
application controller’s before_filter:
@left_sidebar_for_layout = render_to_string(:partial =>
‘shared/left_sidebar’)

Then in my application layout, I simply add them as a string, like I
would @content_for_layout

This normally works fine.

However, when I put them in via an after_filter (or when using them in
a before_filter with the login engine and access a protected method),
I get a double render error.

Shouldn’t I be able to render a partial to a string, regardless of
whether render may have already been performed?

Thanks,
Brad