why not this?

```ruby
pages << page if page.published?
```