updated to use Rails 4.1 gem