Skip to content

Commit

Permalink
fix: eager load actions (#2719)
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Bob authored Apr 24, 2024
1 parent ae3c212 commit f7bf8fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/avo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def boot
@cache_store = Avo.configuration.cache_store
plugin_manager.boot_plugins
Avo.run_load_hooks(:boot, self)
eager_load_actions
end

# Runs on each request
Expand Down Expand Up @@ -139,6 +140,10 @@ def mount_engines
def extra_gems
[:pro, :advanced, :menu, :dynamic_filters, :dashboards, :enterprise, :audits]
end

def eager_load_actions
Rails.autoloaders.main.eager_load_namespace(Avo::Actions)
end
end
end

Expand Down

0 comments on commit f7bf8fe

Please sign in to comment.