detect erb properly