Trying to track down an issue updating a record, and came to this block:
# PATCH/PUT /artefacts/1
# PATCH/PUT /artefacts/1.json
def update
respond_to do |format|
if @artefact.update(artefact_params)
format.html { redirect_to @artefact, notice: 'Artefact was successfully updated.' }
format.json { render :show, status: :ok, location: @artefact }
else
format.html { render :edit }
format.json { render json: @artefact.errors, status: :unprocessable_entity }
end
end
end
Now, to me, this looks like the definition of update
is checking itself, but that can't be right since there's no code to parse artefact_params
.
What am I missing? Where is the code that parses the params and saves the record?
(Using Rails 5.0rc1)