Sha256: d251515a022cc49c5b9117c5ad38885aff295f0711c4bceb7198d03a36f7e0f1
Contents?: true
Size: 322 Bytes
Versions: 11
Compression:
Stored size: 322 Bytes
Contents
module ElocalApiSupport module Actions module Create def create params.permit! obj = associated_model.new(params[@model_name.to_sym]) if obj.save render json: obj else render json: { errors: obj.errors }, status: 422 end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems