-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unsubscribe option #5
base: master
Are you sure you want to change the base?
Conversation
<hr> | ||
<hr> | ||
|
||
<h3>Unsubscribe : (</h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsubscribe :
could you please remove the blank space before the :
?
@@ -92,4 +92,6 @@ | |||
:domain => 'heroku.com', | |||
:enable_starttls_auto => true | |||
} | |||
|
|||
config.action_mailer.default_url_options = { :host => "your-weekly-production.herokuapp.com" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this? The app already works fine today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's for the link_to, it needs the host parameter to build the url
@@ -17,6 +17,24 @@ def create | |||
end | |||
end | |||
|
|||
def unsubscribe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please extract this action and the cancel_subscription
to another controller? This one is turning a little cumbersome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like an unsubscribe controller?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup
end | ||
end | ||
|
||
def cancel_subscription |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a better name here would be confirm unsubscribing
or something like it. Just by the name is a little hard to differ from the one above (unsubscribe
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, i felt the same thing about the naming
For the hacktoberfest 😛