Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 470592a

Browse files
committed
Merge branch 'master' of github.com:minad/olelo
2 parents c0df671 + ced57c4 commit 470592a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/olelo/page.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ class Page
66
include Attributes
77

88
has_around_hooks :move, :delete, :save
9+
has_hooks :after_commit
910

1011
attributes do
1112
string :title
@@ -241,6 +242,9 @@ def update(path, tree_version)
241242

242243
def after_commit(&block)
243244
Page.current_transaction << block
245+
Page.current_transaction << Proc.new do
246+
invoke_hook :after_commit
247+
end
244248
end
245249

246250
def self.check_path(path)

0 commit comments

Comments
 (0)