Hi Jeremy,

A few times I wanted to reuse logic in the single_table_inheritance module 
like:

# Return an instance of the class specified by sti_key,
# used by the row_proc.
def sti_load(r)
  sti_class(sti_model_map[r[sti_key]]).call(r)
end



Would you be open to splitting this up:

def sti_class_from_sti_key(key)
  sti_class(sti_model_map[key])
end


That way someone could call new on that or do other logic. 

-- 
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 [email protected].
To post to this group, send email to [email protected].
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