On May 11, 2006, at 1:15 PM, Esad H. wrote:
However, when calling the action a or b, the @content doesn’t get
but instead rails shows an error message abour missing template.
Here’s a bit of guessing…
The response body already has the content by the time the filter is
run, well, it does by the time the around filters are run so I assume
the after filters too. So I’d guess that rails is looking for its
response content before the filters are run – this makes sense since
the after filters are supposed to have access to whatever is being
returned. Try adding a ‘return false’ at the end of the a and b
methods – if that doesn’t stop the template error then something
else is wrong. The send_data may still not work from the filter, if
it doesn’t, try writing “response.body = @content” (and you’ll have
to get the headers setup properly as well). (note that if you are
using around filters the controller is the argument and you write
something like: “controller.response.body = controller.content” so
make sure that the @content attribute is visible).
Posted via http://www.ruby-forum.com/.
Rails mailing list
Bob H. – blogs at <http://www.recursive.ca/
Recursive Design Inc. – http://www.recursive.ca/
Raconteur – http://www.raconteur.info/
xampl for Ruby – http://rubyforge.org/projects/xampl/