Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c0df671 + ced57c4 commit 470592aCopy full SHA for 470592a
1 file changed
lib/olelo/page.rb
@@ -6,6 +6,7 @@ class Page
6
include Attributes
7
8
has_around_hooks :move, :delete, :save
9
+ has_hooks :after_commit
10
11
attributes do
12
string :title
@@ -241,6 +242,9 @@ def update(path, tree_version)
241
242
243
def after_commit(&block)
244
Page.current_transaction << block
245
+ Page.current_transaction << Proc.new do
246
+ invoke_hook :after_commit
247
+ end
248
end
249
250
def self.check_path(path)
0 commit comments