Sha256: 3a59b0dbedc230654d559812dc5633f6e5bea1f58d17bd0d8afd69678269a493

Contents?: true

Size: 672 Bytes

Versions: 8

Compression:

Stored size: 672 Bytes

Contents

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

8 entries across 8 versions & 2 rubygems

Version Path
devise_token_auth-0.1.43 test/dummy/app/controllers/custom/registrations_controller.rb
digix_devise_token_auth-0.1.44 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth-0.1.43.beta1 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth-0.1.42 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth-0.1.41 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth-0.1.40 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth-0.1.39 test/dummy/app/controllers/custom/registrations_controller.rb
devise_token_auth-0.1.38 test/dummy/app/controllers/custom/registrations_controller.rb