Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fake published_at on preview, if necessary. closes #265

  • Loading branch information...
commit 695ea6c340f432e5082b92a0aab5cd663847798a 1 parent 084605a
@will-r will-r authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  app/controllers/admin/pages_controller.rb
View
1  app/controllers/admin/pages_controller.rb
@@ -60,6 +60,7 @@ def render_preview
if request.referer =~ %r{/admin/pages/(\d+)/edit}
page = Page.find($1).becomes(page_class)
page.update_attributes(params[:page])
+ page.published_at ||= Time.now
else
page = page_class.new(params[:page])
page.published_at = page.updated_at = page.created_at = Time.now
Please sign in to comment.
Something went wrong with that request. Please try again.