Re: ArgumentError when setting ActionMailer

David A. Black
2008-07-12T02:29:54Z

Hi --

On Sat, 12 Jul 2008, Adinda Praditya wrote:

> Hi all,
>
> I don'' know what''s wrong in my setting. I put as it said
in books, tutorials
> and recheck it in the api ref.
>
> ActionMailer::Base.delivery_method :sendmail
>
> When i start the server (Mongrel), i got this error:
>
> config/environment.rb:62:in `delivery_method'': wrong number of
arguments (1
> for 0) (ArgumentError)
>
> Did i miss something?

Yes: an equal sign :-)

   ActionMailer::Base.delivery_method = :sendmail

In the API docs you''ll see this, above the section that lists
deliver_method as one of the things you can tweak:

   These options are specified on the class level, like
   ActionMailer::Base.template_root = "/my/templates"

That means that for everything that follows, you should use that style
of assignment.


David

--
Rails training from David A. Black and Ruby Power and Light:
   Intro to Ruby on Rails  July 21-24      Edison, NJ
   Advancing With Rails    August 18-21    Edison, NJ
See http://www.rubypal.com for details and updates!

--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---