Article: 19 Rails Tricks Most Coders Don't Know
Posted by Daniel Butler Wed, 12 Jul 2006 11:43:00 GMT
Englander Peter Cooper, author of Classroom, a centralized, dynamic class server for ruby based on DRb (Distributed Ruby), has posted an informative article listing 19 Ruby on Rails tricks that every rubyist should know.
These tips include examples that help you:
- Benchmark logic in your controller actions
- Easier collections with to_proc
- Convert arrays to sentences in views
- Send files back to the user
- Iterate though page elements with RJS
- Check for existence
- Number helpers for common number tasks
- Testing different route configurations easily
- Get lots of info about requests
- Improve session performance even more than with ActiveRecord
- Cache unchanging data at application startup
- Check your views are rendering valid HTML/XHTML
- Cleaner HTML output testing
- Run long-running tasks separately in the background
- Make IDs in URLs more user friendly
- Separate out slices of functionality into Engines
- Do aggregate calculations
- XML or YAML output of your data
Thanks for all the tips, Peter!

