Module: ApplicationSignInCallbacksConcern

Extended by:
ActiveSupport::Concern
Included in:
ApplicationController
Defined in:
app/controllers/concerns/application_sign_in_callbacks_concern.rb

Instance Method Summary collapse

Instance Method Details

#sign_in(resource_or_scope, *args) ⇒ Object


5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/controllers/concerns/application_sign_in_callbacks_concern.rb', line 5

def (resource_or_scope, *args)
  original_args = args.dup
  original_args.extract_options!
  resource = original_args.last || resource_or_scope

  if resource.class.included_modules.include?(Devise::SignInCallbacks)
    resource.run_callbacks :sign_in do
      super
    end
  else
    super
  end
end