Within Rails' implementation of REST new and create are treated differently.
An HTTP GET to /resources/new
is intended to render a form suitable for creating a new resource, which it does by calling the new action within the controller, which creates a new unsaved record and renders the form.
An HTTP POST to /resources
takes the record created as part of the new action and passes it to the create action within the controller, which then attempts to save it to the database.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…