modifications for transition to rails 4