RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: complex xViews x
Complex Forms Part 3
Episode #75Oct 15, 2007270 comments

Complex Forms Part 3

In this third and final episode on complex forms I will show you how to edit a project and multiple tasks all in one form. This includes removing and adding tasks dynamically as well. See the show notes for updated code. (16 minutes)
Complex Forms Part 1
Episode #73Oct 01, 2007171 comments

Complex Forms Part 1

Complex forms often lead to complex controllers, but that doesn't have to be the case. In this episode see how you can create multiple models through a single form while keeping the controller clean. (8 minutes)
SimpleForm (revised)
Episode #234Mar 03, 201262 comments

SimpleForm (revised)

Easily generate complex forms with SimpleForm. Here I show how to convert bulky markup into a concise list of fields, customize it by passing options, and add error handling. (9 minutes)
Presenters from Scratch
Episode #287Oct 03, 2011122 comments

Presenters from Scratch

Clean up complex view logic with the help of presenters, and doing this from scratch gives you a lot of flexibility. Here I show not only how to create presenters, but how to test them using Test Unit and RSpec. (14 minutes)
Draper
Episode #286Oct 03, 201171 comments

Draper

Clean up complex view logic using Draper. This gem provides decorators (much like presenters) which bundles view logic in an object oriented fashion. In this episode I do a step-by-step refactoring of a complex template into a decorator. (12 minutes)
Validations in Rails 3
Episode #211Apr 26, 201059 comments

Validations in Rails 3

Rails 3 offers several new additions to validations. Here learn how to make a custom error_messages partial, reflect on validations, and clean up complex validations in a model. (9 minutes)
Complex Forms Part 2
Episode #74Oct 08, 2007117 comments

Complex Forms Part 2

See how to use Javascript and RJS to add and remove form fields dynamically. This episode will build upon the previous episode allowing you to create any number of tasks in one form the same time a project is created. (8 minutes)
Formtastic Part 1
Episode #184Oct 19, 200978 comments

Formtastic Part 1

Formtastic is a concise way to generate form views. In this episode (part 1 of 2) I show how to generate both a simple form and a more complex one which is customized with options. (10 minutes)
Complex Partials
Episode #99Mar 31, 200830 comments

Complex Partials

How do you handle partials which have differences depending on the action which is rendering them? Here's three suggestions for this problem. (8 minutes)
Refactoring Out Helper Object
Episode #101Apr 14, 200844 comments

Refactoring Out Helper Object

If you have complex view logic, this can easily lead to helper methods which call each other. See how to refactor this out into another object in this episode. This is also known as the presenter pattern. (7 minutes)