#45 RJS Tips
Jun 15, 2007 | 7 minutes | Ajax
This episode is packed with little RJS goodies. Learn the different ways to access an element, how to add "if" conditions and how to apply an effect to multiple elements.
Testing JavaScript with PhantomJS
PhantomJS allows us to test JavaScript without going through a browser window. Here I show how to do this using Capybara and Poltergeist. I also give some tips on handling database transactions and skipping javascript tests.
(10 minutes)
Exploring RubyGems
RubyGems can make it easy to add a feature to a Rails application, but it can also cause headaches down the road. Here I give some tips on researching gems to decide which one to choose, or when to do it from scratch.
(7 minutes)
Thread-Safety
The config.threadsafe! option will likely be enabled by default in Rails 4.0. Here you will learn what this option does, how it affects production, and some tips on thread safety.
(10 minutes)
Upgrading to Rails 3.1
It is incredibly easy to upgrade to Rails 3.1, but if you want to take advantage of the asset pipeline you will need to put in some extra effort. Have no fear because I walk you through each of the necessary steps in this episode.
(8 minutes)
7 Security Tips
Security is important! Here I show seven different security flaws which are common to Rails applications ranging from mass assignment to CSRF protection.
(14 minutes)







