Sha256: 46c23d30db86d7878880f20167df289ad0f510dc81bc711d6597eeb5bbcf6010

Contents?: true

Size: 411 Bytes

Versions: 1

Compression:

Stored size: 411 Bytes

Contents

module Api
  class DummyController < ApplicationController
    class << self; attr_accessor :last_action, :last_params, :last_json end

    def dummy(action_name = :dummy)
      self.class.last_action = action_name
      self.class.last_params = params.permit!.to_h
      self.class.last_json = ActiveSupport::JSON.decode(request.body.read) rescue nil
      render json: { head: :no_content }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
openstax_accounts-8.0.0 spec/dummy/app/controllers/api/dummy_controller.rb