Types
- Free Episodes
- Pro Episodes
- Revised Episodes
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:
Free Episodes x
Shortcut Blocks with Symbol to_proc
It may have a goofy syntax, but the Symbol#to_proc feature Rails adds allows you to do simple blocks very quickly and easily.
(3 minutes)
Using with_scope
Learn how to use with_scope - a very powerful method which will allow your custom find methods to accept any find options. Just like magic!
(2 minutes)
Move Find into Model
Move a find into the model to clean up the controllers and remove duplication. Also see how you can call these custom find methods through an association.
(2 minutes)
Find Through Association
No need to pass foreign keys in find conditions, just do the find through a has_many association.
(2 minutes)
Dynamic find_by Methods
Shorten simple finds considerably and improve readability by using the dynamic find_all_by and find_by methods.
(1 minute)
Caching with Instance Variables
Learn a quick way to improve performance. Just store the end result of an expensive command in an instance variable!
(2 minutes)