On 11/16/06, Rob Sanheim <[EMAIL PROTECTED]> wrote: > > The problem is that if render_to_string throws an exception, it never > does forget_variables_added_to_assigns and > reset_variables_added_to_assigns (see render_to_string source in > ActionController::Base). So @variables_added will equal true, and > future instance variables won't be added to assigns, and so of course > won't be available in the view. Thats bad. > > I'm guessing render_to_string is often used in cases like this, where > you just want to grab some static file and its possible the file is > missing. So it seems it should handle the exception gracefully and > reset the variables added to assigns, so later processing in the > action works. > > Does this make sense? Should I submit a patch to handle this correctly?
Please do. Rendering to a string is pretty ugly: notice how render_to_string in an after_filter will wipe the main response.body. jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" 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-core?hl=en -~----------~----~----~----~------~----~------~--~---
