after_filter, but not quite

Dear list,

A client of ours requested a site which has a different background for
each page(don't flame me, I just build it). The background depends on
stuff I pull from the DB. I planned on using an after_filter to set an
instance variable containing the background. Can't do it in a before
filter as the background depends on stuff that happens in the actual
action.

But, as I figured out and in retrospect it makes perfect sense, the
after_filter is ran after the action is already rendered. No good for
me.

So my question really is; how can I made a method which is ran after
all actions?

With kind regards,
Harm

you could override render().

def render(*args)
some_after_filter()
super(args)
end

Thats what I came up with last night(sleeping is overrated)! I think
I'll implement that. Thanks a lot!