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

Adding basic forms to templates - Ruby on Rails Tutorial

From the course: Ruby on Rails 6 Essential Training

Start my 1-month free trial

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…

Contents