Sha256: b9948e14601aae90ed7308d14e0da8e0edcd6ec0c9558ee5dd9d3b4913a829ff

Contents?: true

Size: 703 Bytes

Versions: 20

Compression:

Stored size: 703 Bytes

Contents

# frozen_string_literal: true

class Custom::RegistrationsController < DeviseTokenAuth::RegistrationsController
  def create
    super do |resource|
      @create_block_called = true
    end
  end

  def update
    super do |resource|
      @update_block_called = true unless resource.nil?
    end
  end

  def destroy
    super do |resource|
      @destroy_block_called = true unless resource.nil?
    end
  end

  def create_block_called?
    @create_block_called == true
  end

  def update_block_called?
    @update_block_called == true
  end

  def destroy_block_called?
    @destroy_block_called == true
  end

  protected

  def render_create_success
    render json: { custom: 'foo' }
  end
end

Version data entries

20 entries across 20 versions & 6 rubygems

Version Path
devise_token_auth-1.2.4 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth-1.2.2 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth-1.2.1 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth-1.2.0 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth-1.1.5 test/dummy/app/controllers/custom/registrations_controller.rb
sidecar_token_auth-1.0.1 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth-1.1.4 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth_multitenancy-1.1.3.2 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth_multitenancy-1.1.3.1 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth_multitenancy-1.1.3.alpha1 test/dummy/app/controllers/custom/registrations_controller.rb
devise-tokens-1.0.4 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth-1.1.3 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth-1.1.2 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth-1.1.1 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth-1.1.0 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth_fork_dfabarbosa-1.0.0 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth_skycocker_fork-1.0.0 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth-1.0.0 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth-1.0.0.rc2 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth-1.0.0.rc1 test/dummy/app/controllers/custom/registrations_controller.rb