Closed okliv closed 7 years ago
Weird @okliv, I have several models with that type specifically. Can you try removing Class: 'Task'?
mine (anime):
one_to_many :episodes, as: :media, dependent: :destroy
episode:
many_to_one :media, polymorphic: true
By the way, dont forget to load the plugin:
Sequel::Model.plugin :polymorphic
globally or plugin :polymorphic
in specific models.
no luck...
and i have globally loaded these plugins (in case of possible interference now i will try to disable each of them)
Sequel::Model.plugin :update_or_create
Sequel::Model.plugin :many_through_many
Sequel::Model.plugin :polymorphic
Sequel::Model.plugin :dirty
upd: i have disabled all of them (except :polymorphic
) - error still exists
okay :)
in fact, i have
class MyGem::User < Sequel::Model
and
class MyGem::Task < Sequel::Model
and now i think that problem is somewhere there...
oh... my bad... sorry... finally, i found that in other part of application (custom sequel plugin) there is one before_create
callback that distorted object to be saved... callbacks can be a huge headache :(((
@okliv, Nice that you fixed it! ;)
Welcome to the world of Sequel.
hi!
I have:
If i try from console:
i receive this:
Sequel::DatabaseError: PG::UndefinedColumn: ERROR: column "taskable" of relation "tasks" does not exist
LINE 3: ...ble_id" = 3, "taskable_type" = 'User', "taskable"...
and i am stuck :( any thoughts how it can be fixed or, at least, how can i investigate it more deeply - why? thanks