I have a heap of
fill-out-form/send-website-operator-mail/send-user-confirmation types of
forms. It’s daunting when you think about how many files it takes to do
this. I’m not coming up with an obvious “Rails” way to pull it off, so I
thought it’d be good to know if anyone else has worked through this (7
I’ll concede that I have to write this code once, but once for each
the notion begins to occur to me… Hmmmm, maybe there’s a way to make a
factory or some other usage pattern for these because the real things
change are the data model and the views.
As I said, I haven’t found anything that says “aha! that’s what’s going
be maintainable.” Where I’m at right now is to have a
LotsOfMailersController that contains a method for each mailer. The
and views still have to remain. I’ve refactored some of the repetitive
involved in wiring up the mailer into a protected method.
Any other hints? (I just can’t help thinking there’s some cool Rubyism
View this message in context:
Sent from the RubyOnRails Users forum at Nabble.com.