Categories
- Active Record
- Active Resource
- Active Support
- Administration
- Ajax
- APIs
- Authentication
- Authorization
- Background Jobs
- Caching
- Code Walkthrough
- Controllers
- Debugging
- Deployment
- eCommerce
- Forms
- Mailing
- Models
- Performance
- Plugins
- Production
- Rack
- Rails 2.0
- Rails 2.1
- Rails 2.2
- Rails 2.3
- Rails 3.0
- Rails 3.1
- Rails 3.2
- Rails 4.0
- Refactoring
- Routing
- Search
- Security
- Testing
- Tools
- Views
Auto-Complete Association (revised)
A select menu is often used for setting a belongs_to association, but you should also consider using a text field with autocomple. Here I use jQuery UI and show two different solutions: client side and server side.
(9 minutes)
Virtual Attributes (revised)
Virtual attributes are a clean way to add form fields that do not map directly to the database. Here I show how to handle validations, associations, and more.
(11 minutes)
Nested Model Form (revised)
Handling multiple models in a single form is easy with accepts_nested_attributes_for. Here you will also learn how to add and remove nested records through JavaScript.
(11 minutes)
HABTM Checkboxes (revised)
A many-to-many association can be edited through check boxes in a form. Here I show how to do this with a has_many through association complete with clickable labels.
(6 minutes)
Dynamic Forms
Learn how to add fields to a form dynamically using another form, complete with custom field types. It's fieldception!
(14 minutes)
Auto-Complete Association
Usually a select menu is used for setting a belongs_to association, but in this episode I will show you how to use a text field with auto completion.
(13 minutes)
Token Fields
With the jQuery Tokeninput plugin it is easy to add an autocompleting list of entries for a many-to-many association.
(11 minutes)
Nested Model Form Part 2
Add and remove nested model fields dynamically through JavaScript using either Prototype or jQuery.
(12 minutes)
Formtastic Part 2
Learn about some of the more advanced functionality of Formtastic including handling many-to-many associations, required fields, and styling.
(9 minutes)
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)