On Sunday, July 9, 2017 at 3:14:01 AM UTC-7, Aryk Grosz wrote: > > 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. >
That sounds fine, but could you give an example use case? Thanks, Jeremy -- 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.
