mardi 19 juin 2018

How do I run Rspec code for a simple update code?

How do I run Rspec code for simple update code. Here is a code in my controller

def update
  respond_to do |format|
    if @question.update(question_params)
      format.html { redirect_to @question, notice: t('.question_update') }
    else
      format.html { render :edit }
    end
  end
end

I am trying for too long. Can anyone help!!!!

Aucun commentaire:

Enregistrer un commentaire