query_reviewer icon indicating copy to clipboard operation
query_reviewer copied to clipboard

query_reviewer breaks send_file in Rails 3.0

Open jshraibman-mdsol opened this issue 12 years ago • 2 comments

The problem is this code ( https://github.com/nesquena/query_reviewer/blob/master/lib/query_reviewer/controller_extensions.rb#L42 )

        if response.body.is_a?(String) && response.body.match(/<\/body>/i)

The problem is that as soon as you call response.body the response is ruined and a blank page is shown to the user. You might want to replace response.body.is_a?(String) with response.instance_eval{ @body.is_a?(String) }

jshraibman-mdsol avatar Sep 09 '13 22:09 jshraibman-mdsol

Would you be able to send a quick pull request? happy to patch it in.

nesquena avatar Sep 09 '13 22:09 nesquena

When I try to run rake test I get:

[jshraibman@Joseph-Shraibmans-MacBook-Pro master ~/work/query_reviewer]$ rake test rake aborted! ERROR: 'rake/rdoctask' is obsolete and no longer supported. Use 'rdoc/task' (available in RDoc 2.4.2+) instead. /Users/jshraibman/work/query_reviewer/Rakefile:3:in `<top (required)>' (See full trace by running task with --trace)

jshraibman-mdsol avatar Sep 09 '13 22:09 jshraibman-mdsol