I don't know whether we could use ":class" option. Maybe we can add a new 
option like ":associated_class" in order to patch "associated_class" method.


class Sequel::Model::Associations::AssociationReflection
  def associated_class
    self[:associated_class] or constantize_class_name
  end

  def constantize_class_name
    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
end


Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sequel-talk+unsubscr...@googlegroups.com.
To post to this group, send email to sequel-talk@googlegroups.com.
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to