1 class Orvos::V1::MetadataController < ApplicationController
3 if params[:target_kind] and params[:target_uuid]
4 @objects = Metadatum.where('target_kind=? and target_uuid=?',
5 params[:target_kind], params[:target_uuid])
11 @m = params[:metadatum]
12 if params[:metadatum].class == String
13 @m = uncamelcase_hash_keys(JSON.parse params[:metadatum])
16 respond_to do |format|
18 format.html { redirect_to @m, notice: 'Metadatum was successfully created.' }
19 format.json { render json: @m, status: :created, location: @m }
21 format.html { render action: "new" }
22 format.json { render json: @m.errors, status: :unprocessable_entity }