This project is archived and is in readonly mode.
helper :all for ActionMailer
-
Pratik
- Milestone cleared.
- Assigned user set to Yehuda Katz (wycats)
-
Pratik
- Assigned user changed from Yehuda Katz (wycats) to Pratik
- State changed from new to wontfix
I don't think helper :all has any real value for Mailers. I've never come across a case where I'd want to include all my helpers in mailers as they're typically tied to request/response cycle.
However, you might want to drop an email to the rails core mailing list and see if others find this useful. In which case we can reevaluate the patch.
Thanks !
-
Darragh Curran
No problem.
For me, the value for helper :all was on a reasonably small app, with a few html emails. Some of my mailers were adding nearly all the helpers. I haven't missed it since!
I'd suggest that the value is similar to using helper :all in a controller - how is that justified? (I do respect that some helper methods are request/response dependent, but similarly some may be particular to the context of mailers).
There's an opportunity to extract the duplication wrt helpers out of action_controller/action_mailer, the value there is consistency (in code/tests/documentation). I reckon it's accidental that helper :all doesn't exist in mailers.
Let me know if you'd like me to submit a patch that attempts to resolve the duplication and inconsistency.
Cheers,
Darragh -
swindsor
Actually, this would be really useful for me. It seems odd and broken that this exists for ActionController, but not ActionMailer.
