From b5d8feee2fdee4677e71cdf9b35bfbe3a676bb85 Mon Sep 17 00:00:00 2001 From: Stephen Kenworthy Date: Thu, 26 Oct 2023 12:42:56 +0800 Subject: [PATCH] is_haml? is no longer available. Use ActionView::Base instead --- lib/fat_free_crm/callback.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/fat_free_crm/callback.rb b/lib/fat_free_crm/callback.rb index 933fe19fc3..a78a26a96f 100644 --- a/lib/fat_free_crm/callback.rb +++ b/lib/fat_free_crm/callback.rb @@ -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