Remove unnecessary self.tags.flatten! in favour of a one-line sol'n.
Post#is_published ~> Post#published?