def update
      @topic = Topic.find(params[:id])

      if @topic.update_attributes(topic_params)
        redirect_to(topic_path(@topic.id), notice: t('homeland.topic_updated'))
      else
        render action: "edit"
      end
    end
def update
      @topic = Topic.find(params[:id])

      if @topic.update_attributes(topic_params)
        redirect_to(topic_path(@topic.id), notice: t('homeland.topic_updated'))
      else
        render action: "edit"
      end
    end
PUT /topics/1
 PUT /topics/1.xml