Sha256: 4475fd6ee6b38da0e7aa2ee074d9918b6f1805f85929ca8972e815edd9762756

Contents?: true

Size: 551 Bytes

Versions: 12

Compression:

Stored size: 551 Bytes

Contents

# coding: utf-8
class RegistrationsController < Devise::RegistrationsController
  def new
    build_resource
    render :new
  end

  def edit
    redirect_to edit_dashboard_user_path
  end

  def create
    build_resource
    super
    session[:omniauth] = nil unless @user.new_record?
  end

  private

  def build_resource(*args)
    super
    if session[:omniauth]
      @user.apply_omniauth(session[:omniauth])
      @user.valid?
    end
  end

  def after_update_path_for(scope)
    session[:referrer] ? session[:referrer] : root_path
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
devise_russian-0.0.29 app/controllers/registrations_controller.rb
devise_russian-0.0.28 app/controllers/registrations_controller.rb
devise_russian-0.0.27 app/controllers/registrations_controller.rb
devise_russian-0.0.26 app/controllers/registrations_controller.rb
devise_russian-0.0.25 app/controllers/registrations_controller.rb
devise_russian-0.0.24 app/controllers/registrations_controller.rb
devise_russian-0.0.23 app/controllers/registrations_controller.rb
devise_russian-0.0.22 app/controllers/registrations_controller.rb
devise_russian-0.0.21 app/controllers/registrations_controller.rb
devise_russian-0.0.13 app/controllers/registrations_controller.rb
devise_russian-0.0.12 app/controllers/registrations_controller.rb
devise_russian-0.0.11 app/controllers/registrations_controller.rb