Instantiating a Derived Class from an Instance of Base Class

I’ve got a ‘Task’ base class and a ‘ScheduledTask’ derived class that
I’m currently using with single table inheritance.

I’m trying to create a new ScheduledTask instance from an existing Task

scheduled_task =

but I get a NoMethodError: undefined method `stringify_keys!’ for

I can get around this if I just instantiate a “blank” ScheduledTask
(.new) and manually fill in all of the shared attributes, but I know
there’s gotta be an easier way. Please advise.



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs