#117 Semi-Static Pages
Jul 07, 2008 | 14 minutes | Controllers
Static pages can sometimes be a little awkward to add to a Rails app. See a couple different solutions to this problem in this episode.
- Download:
- source codeProject Files in Zip (104 KB)
- mp4Full Size H.264 Video (23.6 MB)
- m4vSmaller H.264 Video (15.7 MB)
- webmFull Size VP8 Video (42.8 MB)
- ogvFull Size Theora Video (34.8 MB)
Upgrading to Rails 4
With the release of Rails 4.0.0.rc1 it's time to try it out and report any bugs. Here I walk you through the steps to upgrade a Rails 3.2 application to Rails 4.
(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)
Performance Testing
Learn how to add performance tests that automate benchmark and profile reports. Here I show how to find the bottlenecks to optimize a page. I also show how to compile Ruby with gcdata to get information about memory usage.
(16 minutes)
Model Name in URL (revised)
A model's ID in the URL is not very helpful to the user. Consider adding the name which can also improve SEO. Learn how to override to_param, add a slug attribute, and make a catch all route for deep nesting.
(9 minutes)
Tree-Based Navigation (revised)
If your Rails app is content-heavy, consider organizing it in a tree menu structure. Here I show how to add top-level tabs, nested links in a side bar, and breadcrumbs to go up the hierarchy.
(10 minutes)