class Devise::RegistrationsController

def after_inactive_sign_up_path_for(resource)

this method in your own RegistrationsController.
The path used after sign up for inactive accounts. You need to overwrite
def after_inactive_sign_up_path_for(resource)
  respond_to?(:root_path) ? root_path : "/"
end

def after_sign_up_path_for(resource)

in your own RegistrationsController.
The path used after sign up. You need to overwrite this method
def after_sign_up_path_for(resource)
  after_sign_in_path_for(resource)
end

def after_update_path_for(resource)

this method in your own RegistrationsController.
The default url to be used after updating a resource. You need to overwrite
def after_update_path_for(resource)
  signed_in_root_path(resource)
end

def authenticate_scope!

Authenticates the current scope and gets the current resource from the session.
def authenticate_scope!
  send(:"authenticate_#{resource_name}!", :force => true)
  self.resource = send(:"current_#{resource_name}")
end

def build_resource(hash=nil)

temporary session data to the newly created user.
Build a devise resource passing in the session. Useful to move
def build_resource(hash=nil)
  hash ||= resource_params || {}
  self.resource = resource_class.new_with_session(hash, session)
end

def cancel

removing all OAuth session data.
cancel oauth signing in/up in the middle of the process,
in to be expired now. This is useful if the user wants to
Forces the session data which is usually expired after sign
GET /resource/cancel
def cancel
  expire_session_data_after_sign_in!
  redirect_to new_registration_path(resource_name)
end

def create

POST /resource
def create
  build_resource
  if resource.save
    if resource.active_for_authentication?
      set_flash_message :notice, :signed_up if is_navigational_format?
      sign_up(resource_name, resource)
      respond_with resource, :location => after_sign_up_path_for(resource)
    else
      set_flash_message :notice, :"signed_up_but_#{resource.inactive_message}" if is_navigational_format?
      expire_session_data_after_sign_in!
      respond_with resource, :location => after_inactive_sign_up_path_for(resource)
    end
  else
    clean_up_passwords resource
    respond_with resource
  end
end

def destroy

DELETE /resource
def destroy
  resource.destroy
  Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name)
  set_flash_message :notice, :destroyed if is_navigational_format?
  respond_with_navigational(resource){ redirect_to after_sign_out_path_for(resource_name) }
end

def edit

GET /resource/edit
def edit
  render :edit
end

def new

GET /resource/sign_up
def new
  resource = build_resource({})
  respond_with resource
end

def sign_up(resource_name, resource)

RegistrationsController.
Signs in a user on sign up. You can overwrite this method in your own
def sign_up(resource_name, resource)
  sign_in(resource_name, resource)
end

def update

the current user in place.
We need to use a copy of the resource because we don't want to change
PUT /resource
def update
  self.resource = resource_class.to_adapter.get!(send(:"current_#{resource_name}").to_key)
  prev_unconfirmed_email = resource.unconfirmed_email if resource.respond_to?(:unconfirmed_email)
  if resource.update_with_password(resource_params)
    if is_navigational_format?
      flash_key = update_needs_confirmation?(resource, prev_unconfirmed_email) ?
        :update_needs_confirmation : :updated
      set_flash_message :notice, flash_key
    end
    sign_in resource_name, resource, :bypass => true
    respond_with resource, :location => after_update_path_for(resource)
  else
    clean_up_passwords resource
    respond_with resource
  end
end

def update_needs_confirmation?(resource, previous)

def update_needs_confirmation?(resource, previous)
  resource.respond_to?(:pending_reconfirmation?) &&
    resource.pending_reconfirmation? &&
    previous != resource.unconfirmed_email
end