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
Applied Filters:
association x
Find Through Association
No need to pass foreign keys in find conditions, just do the find through a has_many association.
(2 minutes)
Touch and Cache
Rails 2.3.3 brings us a new feature called "touch". See how to use this to auto-expire associated caches in this episode.
(6 minutes)
Tree Based Navigation
The acts_as_tree plugin provides many methods for handling a tree based association. In this episode I show how to build a navigation system with tabs, subpages, and breadcrumbs.
(11 minutes)
Authorization with CanCan
CanCan is a simple authorization plugin that offers a lot of flexibility. See how to use it in this episode.
(15 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)
Session Based Model
If you have a lot of logic associated with the data inside a session, you'll need some central location to put this logic. See how to create a session based model in this episode.
(13 minutes)
HABTM Checkboxes
It is often asked: how do I create a list of checkboxes for managing a HABTM association? Ask no more because this episode will show you how to do exactly that.
(6 minutes)
Two Many-to-Many
There are two different ways to set up a many-to-many association in Rails. In this episode you will see how to implement both ways along with some tips on choosing the right one for your project.
(9 minutes)
Hackers Love Mass Assignment
Your site may be at risk! When using mass assignment, you are giving the user complete control over that model and its associations. See how a hacker might use this vulnerability and learn how to stop it in this episode.
(6 minutes)
Counter Cache Column
If you need to display the record count for a has_many association, you can improve performance by caching that number in a column.
(7 minutes)