indentlabs/notebook

View on GitHub
app/controllers/emails_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
class EmailsController < ApplicationController
  def one_click_unsubscribe
    user = User.find_by(secure_code: params[:code])

    user.update email_updates: false
    render text: "You have been successfully unsubscribed from all emails."
  end
end