Sha256: 22ffdba45f809f9084e1b9542caf76f022250638d5c3dfdc09eb60bd718c13a1
Contents?: true
Size: 418 Bytes
Versions: 26
Compression:
Stored size: 418 Bytes
Contents
class Api::V2::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_v2: "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