Sha256: a4ceeee6d5bd3dbb41b704e9c80086941bf60c3644dc99374938eff8e183f9e0

Contents?: true

Size: 368 Bytes

Versions: 1

Compression:

Stored size: 368 Bytes

Contents

class ParametersController < ApplicationController
  preserve :page, :per_page, only: :index
  preserve :status, allow_blank: true
  preserve :order, prefix: 'preserved'

  def index
    render json: request_parameters
  end

  def create
    render json: request_parameters
  end

  private

  def request_parameters
    params.except(:controller, :action)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
preserve-1.0.0 spec/dummy/app/controllers/parameters_controller.rb