Skip to content

Commit

Permalink
Merge pull request #127 from kaspermeyer/disable-action-methods-initi…
Browse files Browse the repository at this point in the history
…alizer

Disable initializer `action_view_component.eager_load_actions`
  • Loading branch information
joelhawksley authored Nov 22, 2019
2 parents 1aad6f4 + ca6d784 commit 439ac2b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/action_view/component/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ class Railtie < Rails::Railtie # :nodoc:
end
end

initializer "action_view_component.eager_load_actions" do
ActiveSupport.on_load(:after_initialize) do
ActionView::Component::Base.descendants.each(&:action_methods) if config.eager_load
end
end
# Disabled because `ActionView::Component::Base` doesn't implement `#action_methods`
# initializer "action_view_component.eager_load_actions" do
# ActiveSupport.on_load(:after_initialize) do
# ActionView::Component::Base.descendants.each(&:action_methods) if config.eager_load
# end
# end

config.after_initialize do |app|
options = app.config.action_view_component
Expand Down

0 comments on commit 439ac2b

Please sign in to comment.