Skip to content

Commit

Permalink
Merge pull request #1185 from fatfreecrm/fix-callback-hook
Browse files Browse the repository at this point in the history
is_haml? is no longer available. Use ActionView::Base instead
  • Loading branch information
CloCkWeRX authored Oct 26, 2023
2 parents e6883b0 + b5d8fee commit 0acdc65
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/fat_free_crm/callback.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,9 @@ def remove(hook)
#--------------------------------------------------------------------------
module Helper
def hook(method, caller, context = {}, &block)
is_view_hook = caller.is_haml?

# If a block was given, hooks are able to replace, append or prepend view content.
if is_view_hook
# In a view template context, hooks are able to replace, append or prepend content.
if caller.is_a?(ActionView::Base)
hooks = FatFreeCRM::Callback.view_hook(method, caller, context)
# Add content to the view in the following order:
# -- before
Expand Down

0 comments on commit 0acdc65

Please sign in to comment.