update for Rails 3+ compatibility