Skip to content

Commit

Permalink
Don't attempt to set the :provider attribute if the resource doesn't …
Browse files Browse the repository at this point in the history
…have it.
  • Loading branch information
Evan-M committed Feb 13, 2018
1 parent b417dc6 commit dd976d1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class RegistrationsController < DeviseTokenAuth::ApplicationController

def create
@resource = resource_class.new(sign_up_params.except(:confirm_success_url))
@resource.provider = provider
@resource.provider = provider if @resource.has_attribute?(:provider)

# honor devise configuration for case_insensitive_keys
if resource_class.case_insensitive_keys.include?(:email)
Expand Down

0 comments on commit dd976d1

Please sign in to comment.