Forum: Ruby on Rails Best practice question: ActiveMailer

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
schof (Guest)
on 2007-07-14 21:34
(Received via mailing list)
I'm new to Rails but not MVC programming (very familiar with Struts
for instance.)  I'm currently modifying an existing Rails app but I
have some questions about the design decisions that were made in their
code.

The app I'm looking at has an ActiveMailer class but its stored in the
model subdirectory.  Does this sound right to people?  IMO
ActiveMailer resembles a controller more then it does a model.  In
fact, since its deciding which view to render based on the action, its
pretty much exactly like a classic controller.

Apparently Rails when use use the generate script in rails it puts it
in the model directory?  Can someone explain the reasoning behind
this?  IMO its not a very intuitive choice.
This topic is locked and can not be replied to.