# Redirect\_to doesn't work after delivering email

**URL:** <https://www.ruby-forum.com/t/redirect-to-doesnt-work-after-delivering-email/131620>\
**Category:** Rails\
**Created:** [March 11, 2008, 10:50pm UTC](https://www.ruby-forum.com/t/redirect-to-doesnt-work-after-delivering-email/131620 "2008-03-11T22:50:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hendrata](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/4bbf92/32.png) [@hendrata](https://www.ruby-forum.com/u/hendrata)\
**Post date:** [March 11, 2008, 10:50pm UTC](https://www.ruby-forum.com/t/redirect-to-doesnt-work-after-delivering-email/131620/1 "2008-03-11T22:50:55Z")

</div>

Hello,

I have this code, and the redirect\_to doesn’t seem to work after I call  
ActionMailer::deliver\_new.

def create  
…  
if current\_request.save  
…  
group\_users.each do |user|  
#RequestMailer.deliver\_new(current\_request, user)  
end  
#redirect\_to(:action =\> “list”) and return  
else  
…  
end

The code above (when both are uncommented) delivers the email correctly,  
but doesn’t redirect. It just stays at the …/request/create page.

When I comment the deliver\_new line, then it redirects correctly. But  
obviously, no email.

Please help me, is there something trivial that I missed?  
Thank you.  
Hendrata
