Sometimes I spot the code like this:
def bar
#......
if response && response.body
#......
render(:text => html) and return
end
end
I wonder, is there any point of using and return
at the very end of a method?
This is to help avoiding double render errors
. Layouts and Rendering
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With