Skip to content

Commit

Permalink
Changed expiration points in page, now just do it after publishing to…
Browse files Browse the repository at this point in the history
… avoid repeated expirations
  • Loading branch information
bfcapell authored and Jon de Andres committed Oct 9, 2012
1 parent 114559b commit e57c88a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ubiquo_design/app/models/page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ def as_hash
before_save :compose_url_name_with_parent_url
before_create :assign_template_blocks
before_save :update_modified, :if => :is_the_draft?
before_save :expire, :if => :is_the_draft?
before_destroy :expire, :if => :is_the_draft?
after_destroy :is_modified_on_destroy_published

validates :name, :page_template, :presence => true
Expand Down Expand Up @@ -173,6 +171,8 @@ def publish
:is_modified => false,
:published_id => published_page.id
)

expire
end
return true
rescue StandardError => e
Expand Down

0 comments on commit e57c88a

Please sign in to comment.