Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

query_reviewer breaks send_file in Rails 3.0 #31

Open
jshraibman-mdsol opened this issue Sep 9, 2013 · 2 comments
Open

query_reviewer breaks send_file in Rails 3.0 #31

jshraibman-mdsol opened this issue Sep 9, 2013 · 2 comments

Comments

@jshraibman-mdsol
Copy link

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) }

@nesquena
Copy link
Owner

nesquena commented Sep 9, 2013

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

@jshraibman-mdsol
Copy link
Author

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)

nesquena added a commit that referenced this issue Sep 16, 2013
Fix issue #31: Test response @Body instead of response.body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants