On Wednesday, November 9, 2016 at 6:30:46 AM UTC-8, Meredith Maughan - Newby wrote: > > Hi, I have just posted a question to stack overflow as i am struggling > with getting the class table inheritance plugin to work as expected. > > I am using Rails 5 with the Sequel-rails gem > > http://stackoverflow.com/questions/40508471/sequel-class-table-inheritance > > Its mostly teething issues, and i am failing to understand exactly how it > is supposed to work in some cases. > > any help would be great, > What you are asking for with a parent.child method can be done easily using associations instead of class table inheritance.
In terms of why your code isn't working, the main cause is that Parent.first is returning an instance of Parent instead of an instance of Child2. If I had to guess, it's because you are using :key=>"kind" instead of :key=>:kind in the plugin call. In the future, please do not cross post questions. Preferably, ask Sequel questions here, but if you must ask them on Stack Overflow, do not post here asking us to see Stack Overflow. 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.
