Unsubscribe: Best practices

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Unsubscribe: Best practices

Ralph Shnelvar
I have a mailing list in a Postgres database and I want to give my users the ability to unsubscribe from mailings.

I wish to send out emails with a link to an RoR website to handle the unsubscribe.

Is there a document anywhere that describes how to do this properly?  That is, what the link in the email should look like and what the controller(s), routes.rb, and view(s) should look like?

Do I need to do a (implied) DELETE verb anywhere?

Ralph

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a72da346-e897-4eba-a9d0-1fac72ebf872%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Unsubscribe: Best practices

Walter Lee Davis
You don't (really) want a GET action to result in a DELETE, though, so I would recommend that rather than try to make the link in the e-mail delete the record immediately, take the user to a regular page, where you can construct a POST to DELETE, in the usual Rails manner (method: :delete). That gives a person a chance to reconsider, too, in case they fat-fingered the link in a mobile e-mail client.

Walter

> On Jan 10, 2018, at 6:24 AM, Ralph Shnelvar <[hidden email]> wrote:
>
> I have a mailing list in a Postgres database and I want to give my users the ability to unsubscribe from mailings.
>
> I wish to send out emails with a link to an RoR website to handle the unsubscribe.
>
> Is there a document anywhere that describes how to do this properly?  That is, what the link in the email should look like and what the controller(s), routes.rb, and view(s) should look like?
>
> Do I need to do a (implied) DELETE verb anywhere?
>
> Ralph
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a72da346-e897-4eba-a9d0-1fac72ebf872%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3E1FB327-9665-409A-970A-C9C648B301C5%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Unsubscribe: Best practices

Joe Guerra
In reply to this post by Ralph Shnelvar
You basically need a boolean field in your mailing list table called subscribe.  

you can toggle that with true or false for the user by asking a question and flipping this bit.

As far as sending a link  - I already wrote this procedure.  It's quite easy.

https://github.com/merlin2049er/signupebook

basically have a controller that asks for the name and email address (capture that) , then send out a mailer with a link to the file you want.
I have my link to a file in the public folder (but the user isn't aware of that until he get's the email.)



On Wednesday, January 10, 2018 at 6:24:31 AM UTC-5, Ralph Shnelvar wrote:
I have a mailing list in a Postgres database and I want to give my users the ability to unsubscribe from mailings.

I wish to send out emails with a link to an RoR website to handle the unsubscribe.

Is there a document anywhere that describes how to do this properly?  That is, what the link in the email should look like and what the controller(s), routes.rb, and view(s) should look like?

Do I need to do a (implied) DELETE verb anywhere?

Ralph

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b8151988-b55f-4d9a-bb39-56671b0ff1cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Unsubscribe: Best practices

Joe Guerra
I think I have to push an update to this code.

I'm missing the deliver after creating the record.  I'll do that tonight.

On Wednesday, January 10, 2018 at 3:13:30 PM UTC-5, Joe Guerra wrote:
You basically need a boolean field in your mailing list table called subscribe.  

you can toggle that with true or false for the user by asking a question and flipping this bit.

As far as sending a link  - I already wrote this procedure.  It's quite easy.

<a href="https://github.com/merlin2049er/signupebook" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmerlin2049er%2Fsignupebook\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGayBuwqGbRevVncHKeA2qGFpJn3Q&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmerlin2049er%2Fsignupebook\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGayBuwqGbRevVncHKeA2qGFpJn3Q&#39;;return true;">https://github.com/merlin2049er/signupebook

basically have a controller that asks for the name and email address (capture that) , then send out a mailer with a link to the file you want.
I have my link to a file in the public folder (but the user isn't aware of that until he get's the email.)



On Wednesday, January 10, 2018 at 6:24:31 AM UTC-5, Ralph Shnelvar wrote:
I have a mailing list in a Postgres database and I want to give my users the ability to unsubscribe from mailings.

I wish to send out emails with a link to an RoR website to handle the unsubscribe.

Is there a document anywhere that describes how to do this properly?  That is, what the link in the email should look like and what the controller(s), routes.rb, and view(s) should look like?

Do I need to do a (implied) DELETE verb anywhere?

Ralph

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d4536994-3e94-48e0-9f36-10d6d8a75b0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.