Sha256: 65d6a5ca1ea4a4fe00865cf77bebefe634594954c3a438b3dc027342af6dac09

Contents?: true

Size: 467 Bytes

Versions: 7

Compression:

Stored size: 467 Bytes

Contents

class Custom::SessionsController < DeviseTokenAuth::SessionsController

  def create
    super do |resource|
      @create_block_called = true
    end
  end

  def destroy
    super do |resource|
      @destroy_block_called = true
    end
  end

  def create_block_called?
    @create_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

7 entries across 7 versions & 1 rubygems

Version Path
devise_token_auth-0.1.37 test/dummy/app/controllers/custom/sessions_controller.rb
devise_token_auth-0.1.37.beta4 test/dummy/app/controllers/custom/sessions_controller.rb
devise_token_auth-0.1.37.beta3 test/dummy/app/controllers/custom/sessions_controller.rb
devise_token_auth-0.1.37.beta2 test/dummy/app/controllers/custom/sessions_controller.rb
devise_token_auth-0.1.37.beta1 test/dummy/app/controllers/custom/sessions_controller.rb
devise_token_auth-0.1.36 test/dummy/app/controllers/custom/sessions_controller.rb
devise_token_auth-0.1.35 test/dummy/app/controllers/custom/sessions_controller.rb