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
Bullet
Bullet will notify you of database queries that can potentially be improved through eager loading or counter cache column. A variety of notification alerts are supported.
(6 minutes)
Optimistic Locking (revised)
There is a chance one user will unintentionally override someone else's changes if they update a record near the same time. One solution is to use optimistic locking. The updated_at column can also be used for this as shown.
(8 minutes)
Strong Parameters
The strong_parameters gem is an improvement over attr_accessible to securely handle mass assignment even when you have complex authorization logic. The functionality will likely be added to Rails 4 so it is a good idea to learn how it works.
(12 minutes)
Ransack
Ransack allows you to easily build complex search forms. It also helps in adding sortable links and building a dynamic advanced search page.
(10 minutes)
Mongoid (revised)
Mongoid is a Ruby gem for interacting with MongoDB. Here I show the basics of setting up an app, querying for records, adding embedded associations, overriding the id, and more.
(9 minutes)
Client-Side Performance
Optimizing Rails performance can only take you so far. The client-side plays a big part in how fast a page feels. Here I show many tools that can help make your apps faster than ever.
(14 minutes)
MiniProfiler
MiniProfiler allows you to see the speed of a request conveniently on the page. It also shows the SQL queries performed and allows you to profile a specific block of code.
(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)
Celluloid
Celluloid puts an object-oriented spin on multi-threaded development. Here I cover the fundamental features of Celluloid in several examples.
(11 minutes)
Sidekiq
Sidekiq allows you to move jobs into the background for asynchronous processing. It uses threads instead of forks so it is much more efficient with memory compared to Resque.
(10 minutes)