Sha256: 9ef2aff9ba3a024e51cf23587f9f2d8a4890fd2771f8c0fea1fcfc2d21ce3703

Contents?: true

Size: 702 Bytes

Versions: 8

Compression:

Stored size: 702 Bytes

Contents

# frozen_string_literal: true

class Custom::RegistrationsController < DeviseJwtAuth::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

8 entries across 8 versions & 3 rubygems

Version Path
devise_jwt_auth722-0.1.7 test/dummy/app/controllers/custom/registrations_controller.rb
devise_jwt_auth7-0.1.7 test/dummy/app/controllers/custom/registrations_controller.rb
devise_jwt_auth-0.4.1 test/dummy/app/controllers/custom/registrations_controller.rb
devise_jwt_auth-0.4.0 test/dummy/app/controllers/custom/registrations_controller.rb
devise_jwt_auth-0.3.0 test/dummy/app/controllers/custom/registrations_controller.rb
devise_jwt_auth-0.2.0 test/dummy/app/controllers/custom/registrations_controller.rb
devise_jwt_auth-0.1.7 test/dummy/app/controllers/custom/registrations_controller.rb
devise_jwt_auth-0.1.6 test/dummy/app/controllers/custom/registrations_controller.rb