[WIP] upgrade for rails 4