In Rails I can automatically create a set of routes for CRUD actions using resources in the routes file.
This creates index, new
Well, it does not use redirect. It directs you to the exact method with the html form action.
To clarify it:
When you are in "/articles/new". Rails will dispatch you to Controller#new action.
And, if the _form partial is implemented with Form Helpers by using form_for
<%= form_for @article do |f| %>
<% end %>
It will generate html form, like so:
As you can see, the form action attribute is "/article" which is mapped to your CRUD actions in the resource.
Then, after you click submit button in the form, the data in the form will be sent to create action as specified in the form tag action attribute.
And the exact same partial _form (form_for) code we have used, can also be used to edit an Article. If @article record is already existed in the table and the form_for will yield this html form instead:
And, you can notice that action attribute now will direct you to update action in the CRUD.
Therefore, form_for reflects knowledge about the resource it deals with or Record Identification like Rails document said (http://guides.rubyonrails.org/form_helpers.html#2.3)
Hope this helps you understand it :)