change condition in Rails example to avoid to fail