I have an ActionMailer, which has a corresponding controller (shown
below). The form to create the email gets invoked from another form, a
list of names and email addresses from another Model. I would like to
return to this list after the mail is sent (for now, however, I am
merely trying to return to Application.home() )

I have:

class EmailerController < ApplicationController
  def sendmail
       recipient = params[:email][:recipient]
       subject = params[:email][:subject]
       message = params[:email][:message]
       returnadd = current_associate.email
       mymail = Emailer.create_contact(recipient, subject, message,
returnadd)
       Emailer.deliver(mymail);

    render :controller => 'application', :action => 'home'

  end
end

Nothing happens -- nothing with the view changes after I click send on
the form that feeds sendmail(), though the sendmail() gets executed
and the mail properly sent. When I look into my logs, I see:

-----------------
ActionView::MissingTemplate (Missing template emailer/list.erb in view
path app/views):
  app/controllers/emailer_controller.rb:11:in `sendmail'

Rendering rescues/layout (internal_server_error)
--------------------

But I do have an application controller and it does have a home
method. Why does ActionMailer not forward onto there in my render
command? How, typically, can I put the view back to what it WAS before
the user elected to send an email ? -Janna B

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to