You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: active_record_model_extension.rb
    path of file: ./repos/stackneveroverflow/vendor/bundle/ruby/2.3.0/gems/kaminari-activerecord-1.0.1/lib/kaminari/activerecord
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
require 'kaminari/activerecord/act
    
        def self.#{Kaminari.config.page_method_name}(num = nil)
          per_page = max_per_page && (default_per_page > max_per_page) ? max_per_page : default_per_page
          limit(per_page).offset(per_page * ((num = num.to_i - 1) < 0 ? 0 : num)).extending do
            include Kaminari::ActiveRecordRelationMethods
            include Kaminari::PageScopeMethods
          end
        end