Sha256: b5622f344ba09c562b214980289fc2648135e3c5686240e294bc4ac1986fc26a

Contents?: true

Size: 756 Bytes

Versions: 5

Compression:

Stored size: 756 Bytes

Contents

# frozen_string_literal: true

module Devise
  module Models
    # Registerable is responsible for everything related to registering a new
    # resource (ie user sign up).
    module Registerable
      extend ActiveSupport::Concern

      def self.required_fields(klass)
        []
      end

      module ClassMethods
        # A convenience method that receives both parameters and session to
        # initialize a user. This can be used by OAuth, for example, to send
        # in the user token and be stored on initialization.
        #
        # By default discards all information sent by the session by calling
        # new with params.
        def new_with_session(params, session)
          new(params)
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
devise-4.5.0 lib/devise/models/registerable.rb
devise-4.4.3 lib/devise/models/registerable.rb
devise-4.4.2 lib/devise/models/registerable.rb
devise-4.4.1 lib/devise/models/registerable.rb
devise-4.4.0 lib/devise/models/registerable.rb