I think he means in your blog post, you have samples like this:

Notifier.signup_notification.deliver

Ie. calling the signup_notification class method with no arguments. And yet what you showed defined in the Notifier class was an instance method expecting a parameter that you've named recipient in your examples:

def signup_notification(recipient)

I was wondering the same thing, where is that recipient argument coming from?

On Jan 25, 2010, at 8:10 PM, Mikel Lindsaar wrote:

2010/1/26 Nicolás Sanguinetti <[email protected]>:
Nice.

Thanks :)

I'm not sure I understand the new API though. You define instance
methods but call class methods? Also, what's that magic recipient
parameter we never pass in? Why not just define class methods? Eg:

Class methods won't work unfortunately, this is because you can't play
with instance variables or call other instance methods (like headers
or attachments)

I am not sure what the magic recipient parameter is we never pass in.
If you are talking about the old API doing:

    recipients      recipient.email_address_with_name

This is replaced with

   mail(:to => recipient.email_address_with_name)

Mikel

---
http://lindsaar.net/

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails- [email protected]. To unsubscribe from this group, send email to [email protected] . For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en .


--
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to