Formatting existing resources uses PUT , forms a new POST resource. REST compliant is described here .
From rails form_for helper code:
action, method = object.respond_to?(:persisted?) && object.persisted? ? [:edit, :put] : [:new, :post]
and persisted? for ActiveRecord is declared as:
!(new_record? || destroyed?)
PinnyM
source share