Rob Wilkerson wrote: > With the caveat that I'm exactly two days into learning Ruby/Rails, I'd > offer this from a purely MVC perspective. The sending of email is > application functionality. The model is for business logic and data > manipulation.
> When I think about situations like this, I consider an API. If I were > developing an API that allowed a user to reset their password, would I > want my code to send an email? My answer is "probably not". I'd want the > application that _calls_ the API to send that email - if the developer > chose to do so. That tells me that the model probably isn't the right > place. You just said "Dependency Inversion Principle". Look that up. --~--~---------~--~----~------------~-------~--~----~ 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 [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-talk?hl=en -~----------~----~----~----~------~----~------~--~---

