Sha256: 2719dd7115feffebafe27fce9720e29cfceb67449d08d77fb7dab95102920420

Contents?: true

Size: 447 Bytes

Versions: 1

Compression:

Stored size: 447 Bytes

Contents

class Devise::SubscribesController < DeviseController

  # GET /resource/subscribe/unsubscribe?unsubscribe_token=abcdef
  def update
    unless params[:unsubscribe_token] && self.resource = resource_class.find_by_unsubscribe_token(params[:unsubscribe_token])
      set_flash_message(:alert, :unsubscribe_token_invalid)
      return redirect_to after_sign_out_path_for(resource_name)
    end
    resource.update_column :subscribe, false
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
devise_subscribable-0.0.1 app/controllers/devise/subscribes_controller.rb