Updated so that it's compatible w/ Rails 4