Sha256: ed18a9f08138d77659dac16ae2ac782848a42cc94b8f3257ab2100c579199378

Contents?: true

Size: 594 Bytes

Versions: 9

Compression:

Stored size: 594 Bytes

Contents

class RegistrationsController < Devise::RegistrationsController
  def update_resource(resource, params)
    if resource.encrypted_password.blank? # || params[:password].blank?
      resource.email = params[:email] if params[:email]
      if !params[:password].blank? && params[:password] == params[:password_confirmation]
        logger.info "Updating password"
        resource.password = params[:password]
        resource.save
      end
      if resource.valid?
        resource.update_without_password(params)
      end
    else
      resource.update_with_password(params)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
happy_seed-0.0.21 lib/generators/happy_seed/omniauth/templates/app/controllers/registrations_controller.rb
happy_seed-0.0.19 lib/generators/happy_seed/omniauth/templates/app/controllers/registrations_controller.rb
happy_seed-0.0.18 lib/generators/happy_seed/omniauth/templates/app/controllers/registrations_controller.rb
happy_seed-0.0.17 lib/generators/happy_seed/omniauth/templates/app/controllers/registrations_controller.rb
happy_seed-0.0.16 lib/generators/happy_seed/omniauth/templates/app/controllers/registrations_controller.rb
happy_seed-0.0.15 lib/generators/happy_seed/omniauth/templates/app/controllers/registrations_controller.rb
happy_seed-0.0.14 lib/generators/happy_seed/omniauth/templates/app/controllers/registrations_controller.rb
happy_seed-0.0.13 lib/generators/happy_seed/omniauth/templates/app/controllers/registrations_controller.rb
happy_seed-0.0.12 lib/generators/happy_seed/omniauth/templates/app/controllers/registrations_controller.rb