It would be nice to have mail interceptor be able to modify the message to
prevent delivery. Alternatively it would be nice to also prevent delivery
in the mailer itself.
The use cases are as follows:
1. User is unsubscribed and you really want to prevent emails being sent
to such
-1.
I don't see the point of this option. If you don't want to send an email,
then don't call the mailer method and that's it.
Also:
3. The email content may be spammy and you want to prevent that delivery
Well, don't spam your users in the first place!
On Thu, Jul 19, 2012 at 7:37 AM,
Hi,
I met the same need (eg: to avoid sending any email until the user is
confirmed for instance) but did not implement anything yet.
I would probably just create a custom_mail method to be used in place
of mail, which would decide based on your logic if mail must be called
or not.
That said
Having the ability to easily comply to CAN-spam and other email legislation
without having to add an if clause to _everywhere_ you are sending out email
would be nice.
Looks like you can already do something like this a mail interceptor:
If an interceptor can cleanly stop the delivery even for say Devise or
other dependencies initiated emails, it would provide a consistent
behaviour through the apps, which would be neat.
-- Thibaut
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Core
I decided to go the ActiveSupport::Concern strategy.
The reason is that a co-worker said he had done the Class.class_eval
strategy
suggested by Forem/Spree (see Ryan Bigg's comment), and this would randomly
break. The basic ActiveSupport::Concern strategy looks like this.
I have rails app which uses Rails 3.2.6 Ruby 1.9.3p0 version.I have
number of CSS JS(using JQuery) files in my assets folder with assets
pipeline.Everything works fine but I switch from*development to production
with compression* to single file named application.css application.js
then my
This is a general Rails question and not related to the core development of the
framework. Please refrain from asking such questions on this list.
Instead, ask them on rubyonrails-talk or StackOverflow.
Thanks!
On Friday, 20 July 2012 at 2:49 AM, Anu wrote:
I have rails app which uses