require "cells"
require "kaminari/helpers/helper_methods"
require "kaminari/cells/version"
require "cell/partial"

ActiveSupport.on_load :action_view do
  module Kaminari
    module Helpers
      module CellsHelper
        include Kaminari::Helpers::HelperMethods
        include ActionView::Helpers::OutputSafetyHelper
        include ActionView::Helpers::TranslationHelper
        include Cell::ViewModel::Partial

        def paginate(scope, **options, &block)
          options = options.reverse_merge(:views_prefix => "../views/")
          super
        end
      end
    end
  end
end

require 'kaminari/cells'

require "cells"
require "kaminari/helpers/helper_methods"
require "kaminari/cells/version"
require "cell/partial"

ActiveSupport.on_load :action_view do
  module Kaminari
    module Helpers
      module CellsHelper
        include Kaminari::Helpers::HelperMethods
        include ActionView::Helpers::OutputSafetyHelper
        include ActionView::Helpers::TranslationHelper
        include Cell::ViewModel::Partial

        def paginate(scope, **options, &block)
          options = options.reverse_merge(:views_prefix => "../views/")
          super
        end
      end
    end
  end
  require 'kaminari/cells'
end

Move require of kaminari/cells into ActionView load hook
Move require of kaminari/cells into ActionView load hook

Previously when eager loading a rails application using zeitwerk, the
Kaminari::Helpers::CellsHelper module was included before it was defined
by the load hook.
