Sha256: d5baf32a59880cb51f6187ebcef268755d22a5ea0821254d2c0b1eec9d1d09a0
Contents?: true
Size: 415 Bytes
Versions: 26
Compression:
Stored size: 415 Bytes
Contents
class Api::V1::PingsController < Api::ApiController def create if ping_params[:error] render json: { errors: Stitches::Errors.new([ Stitches::Error.new(code: "test", message: ping_params[:error]) ])} , status: 422 else render json: { ping: { status: "ok" } }, status: (ping_params[:status] || "201").to_i end end private def ping_params params.permit(:error, :status) end end
Version data entries
26 entries across 18 versions & 1 rubygems