Closed msenne closed 9 years ago
I cannot reproduce your problem in a vanilla Rails app. When I use a node
with a Rails.logger
call inside, I only get one line in the log. Do you also have this problem when rendering the template outside of pry, like when running rails s
?
Yes, I did have that issue without activating the debugger.
I can no longer reproduce this issue today, so I am closing the issue. Perhaps it was a case of needing to restart the application again after the changes.
I might be misunderstanding something, but it does appear that for my single node it is running the block twice. This may also be an issue with RABL as opposed to rabl-rails, just let me know if I'm in the wrong place.
Here's my complete show.json.rabl:
Here's the (redacted) JSON output:
There's only 1 'data' node in the output, but when debugging (binding.pry) the #execute method, triggered from the RABL node, I see that it executes twice. The log statement also appears twice in the console for each request.
Should this be happening as a standard practice? Is there something about my case in particular that would cause this? Thanks for any help!