From the course: Ruby on Rails 6 Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Adding basic forms to templates - Ruby on Rails Tutorial
From the course: Ruby on Rails 6 Essential Training
Adding basic forms to templates
- [Instructor] Before we can add the creative, update, and delete actions to our controllers, we need to learn about using forms in Ruby on Rails. There're a couple of points that I want you to remember before we dive in. The first is that anything that we can write with our Ruby on Rails helpers can also be written using simple HTML. That's all the helpers are doing. They're helping us to write HTML code. In the end result, they get sent back to the browser. It's always just plain HTML. But the second point is that writing code using the helpers is almost always easier, more powerful, and has lots of extra benefits than using simple HTML alone. Let's first begin by just looking at a standard HTML form. Again, this is not Ruby on Rails, just basic HTML. Notice that my form has three text input fields for name, position, and visible. Followed by a submit button labeled "create subject." Notice this form is going to use the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Read action: Index4m 20s
-
(Locked)
Read action: Show4m
-
(Locked)
Adding basic forms to templates4m 51s
-
(Locked)
Create action: New4m 12s
-
(Locked)
Create action: Create5m 5s
-
(Locked)
Using strong parameters to regulate input4m 57s
-
(Locked)
Update actions: Edit and update6m 19s
-
(Locked)
Using partials and helpers to organize code6m 36s
-
(Locked)
Delete actions: Delete and destroy5m 50s
-
(Locked)
Challenge: Pages CRUD1m 23s
-
(Locked)
Solution: Pages CRUD4m 50s
-
(Locked)
-