Skip to content

Instantly share code, notes, and snippets.

View gabriel-dehan's full-sized avatar
🌴
On vacation

Gabriel Dehan gabriel-dehan

🌴
On vacation
View GitHub Profile
class Users::RegistrationsController < Devise::RegistrationsController
before_action :configure_permitted_parameters
# Handles editing when provider is facebook
def update_resource(resource, params)
if current_user.provider == "facebook"
params.delete("current_password")
resource.update_without_password(params)
else
resource.update_with_password(params)