def update
    @topic = Topic.find(params[:id])
    if @topic.update_attributes(topic_params)
      redirect_to admin_level_path(@topic.level_id), notice: "Topic successfully updated."
    else