Adding Rails if snippet