On is_present? ... in general I prefer duplicating clauses like that, in my experience is really easy for someone (eg the author,3 months later!) to remove the earlier clause without thinking about the later one. The to_i here is more reasonable since >0 is the only valid value range anyway.