Displaying 1 result from an estimated 1 matches for "webservice_post".
2007 Nov 30
5
render_to_string in an after filter
...in an after_filter, which renders a partial
that is sent to a web service. Here''s the code:
class MyController < ApplicationController
after_filter :post_to_webservice
def show
# show logic
end
def post_to_webservice
stuff = render_to_string :partial => ''stuff''
webservice_post(stuff)
end
I get a DoubleRenderError in the after filter. As I understand it,
the ''show'' action will be rendered, but won''t be sent to the browser
until the after filter is called. Because the ''show'' action is
already rendered (but not sent), we get a...