updates for ruby 2.0 and rails 4