Before writing code for creating, updating, and deleting records, it is necessary to first learn the basics of working with forms in Ruby on Rails. There are many helper methods that make it easier to work with forms and form fields. These helpers are easier to use, more powerful, and include many extra benefits over writing simple HTML.
- [Teacher] Before we can add the create, update,…and delete action in our controllers…we need to learn about using forms in Ruby on Rails.…We'll introduce the basics of forms now,…and then take a deeper dive later.…There are a couple of points that I want you to remember…about working with Rails helpers…to generate HTML for our forms.…The first is that anything that we can write…with the helpers can also be written using simple HTML.…That's all the helpers are doing,…they're helping us write HTML…and the end result that gets sent back…to the browser is always just going to be plain HTML.…
The second point is that writing code…using these helpers is almost always easier,…more powerful, and includes lots of extra benefits…than if we use simple HTML alone…and we'll see some of those as we go along.…Let's first begin by looking at a standard HTML form.…Again this not Ruby on Rails, this is just basic HTML.…Notice that my form has three text input fields…for name, position, and visible,…followed by a submit button labelled Create Subject.…
- Creating and configuring a new Ruby on Rails project
- Generating controllers and views
- Handling server requests
- Using different types of routes
- Rendering and viewing templates
- Generating migrations and models
- Creating, updating, and deleting records
- Finding records with queries
- Understanding relationship types
- Writing controllers for CRUD
- Working with layouts and helpers
- Managing application assets
- Building forms
- Validating data
- Authenticating users
Skill Level Beginner
1. What Is Ruby on Rails?
2. Get Started
3. Controllers, Views, and Dynamic Content
4. Databases and Migrations
5. Models and ActiveRecord
7. CRUD, REST, and Resourceful Routes
8. Controllers and CRUD
9. Layouts, Partials, and View Helpers
12. Data Validation
13. Controller Features
14. User Authentication
15. Improve the Simple CMS
Next steps1m 44s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.