- end
- end
-
- extend ActiveSupport::Concern
-
- # This module creates compiled delegation methods dynamically at runtime, which makes
- # subsequent calls to that method faster by avoiding method_missing. The delegations
- # may vary depending on the klass of a relation, so we create a subclass of Relation
- # for each different klass, and the delegations are compiled into that subclass only.
-
- BLACKLISTED_ARRAY_METHODS = [
- :compact!, :flatten!, :reject!, :reverse!, :rotate!, :map!,
- :shuffle!, :slice!, :sort!, :sort_by!, :delete_if,
- :keep_if, :pop, :shift, :delete_at, :select!
- ].to_set # :nodoc:
-
- delegate :to_xml, :to_yaml, :length, :collect, :map, :each, :all?, :include?, :to_ary, :join, to: :to_a
-
- delegate :table_name, :quoted_table_name, :primary_key, :quoted_primary_key,
- :connection, :columns_hash, :to => :klass
-