I have been reading up on the difference between put and post requests and I have some related questions as it pertains to rails: I would like to change one specific field in an already created row...should I use a put or a post request? For example are the following different?
#Assume this is a put request
def update
@model=Model.find(x)
@model.field="new_field"
@model.save
end
#Assume this is a post request
def update
@model=Model.find(x)
@model.field="new_field"
@model.save
end
#What if I use the rails update method?
def update
@model=Model.find(x)
@model.update(model_params)
@model.save
end
Thanks in advance.