DEV Community

Matt
Matt

Posted on

Notes from class 1

Back on the horse. Today we jumped into refactoring code we learned in App Dev 1, in particular improving form functionality. One item of note was the addition of authenticity tokens to forms to add security such that other sites can't grab a form and submit unrelated content for a database.

<input type="hidden" name="authenticity_token" value="<%= form_authenticity_token %>" >
Enter fullscreen mode Exit fullscreen mode

Ruby pulls the token from that method that is called in-line within the form.

GitPod shortcut of the week

Select some text and then press Command + D selects the next instance of identical text in the document, using arrow keys you can then edit multiple lines at the same time.

Top comments (0)