Changed Rails versions, removed attr_accessible, and changed count to what Rails4 requires