Method: Sequel::Model::Associations::AssociationReflection#associated_class

Defined in:
lib/sequel/model/associations.rb

#associated_classObject

The class associated to the current model class via this association



66
67
68
69
70
71
72
73
74
# File 'lib/sequel/model/associations.rb', line 66

def associated_class
  cached_fetch(:class) do
    begin
      constantize(self[:class_name])
    rescue NameError => e
      raise NameError, "#{e.message} (this happened when attempting to find the associated class for #{inspect})", e.backtrace
    end
  end
end