updates for rails 4. not backwards compatible.