#125 Dynamic Layouts
Discover how to dynamically change the layout using content in the database. Check out this episode for details.
- Download:
- source codeProject Files in Zip (113 KB)
- mp4Full Size H.264 Video (18.9 MB)
- m4vSmaller H.264 Video (12.7 MB)
- webmFull Size VP8 Video (33 MB)
- ogvFull Size Theora Video (26.3 MB)
Model Caching (revised)
Caching at a low level is a great option when the view is too dynamic to cache and you need something flexible that can work anywhere in the application. Here I show a variety of ways to use Rails.cache with Active Record.
(12 minutes)
Handling Exceptions (revised)
By default, Rails will render a static error file when an exception occurs in production. Here you will learn how to fully customize this behavior and render dynamic error pages.
(11 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)
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)