method

generate_relation_method

generate_relation_method(method)
private

No documentation available.

# File activerecord/lib/active_record/relation/delegation.rb, line 49
        def generate_relation_method(method)
          if /\A[a-zA-Z_]\w*[!?]?\z/.match?(method)
            generated_relation_methods.module_eval               def #{method}(*args, &block)                scoping { klass.#{method}(*args, &block) }              end, __FILE__, __LINE__ + 1
          else
            generated_relation_methods.send(:define_method, method) do |*args, &block|
              scoping { klass.public_send(method, *args, &block) }
            end
          end
        end