Is there a way to have subfolders for actionmailer email templates?
def new_message(user)
@user = user
mail(:to => user.email, :subject => "You have recieved a new message!")
end
would load /app/mailers/new_message.text.erb for example.
Is there a way to have the mail templates stored like /app/mailers/messages/new_message.text.erb?
I try to organize it a bit more and don’t like everything in 1 big directory ( think of the text and html versions + several local _en, _fr versions this becomes one big pile of files.
I don’t know if you can actually do that, but I am sure you can create multiple ActionMailer classes like a Notifier:
class Notifier < ActionMailer::BaseAnd define the notifications methods here (welcome messages, changing password, …: auto messages)
With that you can segment your “Mail methods” in different models, depending on their roles.
I know it does not answer the question, but its a workaround 😉