Dr Fragen in the operating room

Squib rendering, part 2


In the `homepage_controller.rb` there is a private definition `publish_changes` that contains the pages that are rendered if the entry is newly posted or updated. The part relating to rendering archive pages is as follows.
publish( “archive_page”, {
:year => entry.when_published.year,
:month => entry.when_published.month,
:day => entry.when_published.day
} )
Because it passes all three parameters to the publish function only the daily archive page is produced. If we could encapsulate this inside of a loop to send the `publish( “archive_page”, ….. )` 3 times first with only the `:year`, then with `:year` and `:month`, and finally with `:year`, `:month`, and `:day` I think it would then render all three archive pages with each new post or update.
Now all I have to do is learn enough Ruby to figure this out. Matt, does this make sense or is there a better way?
**Update:** I found a better way. Even better is, it works.