Exception: ActiveSupport::DelegationError

Inherits:
NoMethodError
  • Object
show all
Defined in:
lib/active_support/delegation.rb

Overview

Error generated by delegate when a method is called on nil and allow_nil option is not used.

Class Method Summary collapse

Class Method Details

.nil_target(method_name, target) ⇒ Object

:nodoc:



10
11
12
# File 'lib/active_support/delegation.rb', line 10

def nil_target(method_name, target) # :nodoc:
  new("#{method_name} delegated to #{target}, but #{target} is nil")
end