https://avo.cool logo
https://docs.avohq.io/3.0/guides/use-own-helper...
# feedback
f
https://docs.avohq.io/3.0/guides/use-own-helpers-in-resource-files.html#tl-dr - adding this breaks the app. I had to do it like this
Copy code
Rails.configuration.to_prepare do
  module FieldExtensions
    helper_names = ActionController::Base.all_helpers_from_path Rails.root.join("app", "helpers")
    helpers = ActionController::Base.modules_for_helpers helper_names
    helpers.each do |helper|
      send(:include, helper)
    end
  end

  Avo::Fields::BaseField.include FieldExtensions
end
rails 7.1.3.4 ruby 3.3.7 avo 3.23
m
Thread automatically created by Yaro (SupeRails.com) in #feedback
l
Hi Yaro, you mean the template breaks the app?