fix rails condition on view