Sha256: d66627a40320ea3b49ac38b257a2ac87599543a311e7f6722ce3b45739a7d71c

Contents?: true

Size: 701 Bytes

Versions: 6

Compression:

Stored size: 701 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

6 entries across 6 versions & 1 rubygems

Version Path
devise_jwt_auth-0.1.5 test/dummy/app/controllers/custom/registrations_controller.rb
devise_jwt_auth-0.1.4 test/dummy/app/controllers/custom/registrations_controller.rb
devise_jwt_auth-0.1.3 test/dummy/app/controllers/custom/registrations_controller.rb
devise_jwt_auth-0.1.2 test/dummy/app/controllers/custom/registrations_controller.rb
devise_jwt_auth-0.1.1 test/dummy/app/controllers/custom/registrations_controller.rb
devise_jwt_auth-0.1.0 test/dummy/app/controllers/custom/registrations_controller.rb