app/controllers/api/tags_controller.rb
# fetch a tag record for updating
fetch a tag record for updating
fetch a tag record for updating
def edit
    @tag = Tag.find params[:id]
    if !@tag.admin.nil? && @tag.admin != current_user
      render json: { error: '403 requested operation not permitted' }, status: 403
    else
      render :show, status: 200
    end
  end
def edit @tag = Tag . find params [ :id ] if ! @tag . admin . nil? && @tag . admin != current_user render json : { error : '403 requested operation not permitted' } , status : 403 else render :show , status : 200 end end
fetch a tag record for updating
fetch a tag record for updating