method

generate_method

generate_method(method)
public

No documentation available.

# File activerecord/lib/active_record/relation/delegation.rb, line 58
      def generate_method(method)
        synchronize do
          return if method_defined?(method)

          if /\A[a-zA-Z_]\w*[!?]?\z/.match?(method)
            module_eval               def #{method}(*args, &block)                scoping { klass.#{method}(*args, &block) }              end, __FILE__, __LINE__ + 1
          else
            define_method(method) do |*args, &block|
              scoping { klass.public_send(method, *args, &block) }
            end
          end
        end
      end