activerecord-typedstore icon indicating copy to clipboard operation
activerecord-typedstore copied to clipboard

super: no superclass method `extract_default'

Open DLawla opened this issue 8 years ago • 6 comments

Hi there, I'm seeing an issue when jumping to edge rails (6.0.0.alpha) from 5.2.0.rc1 which you may be already aware of: super: no superclass method `extract_default' for #<ActiveRecord::TypedStore::Column:0x00007f9582c27c88>

We have a model with JSON column, defined as follows in the model:

typed_store :metadata, coder: JSONCoder do |p|
    p.integer :foo
 end

JSONCoder is copy-paste of the DumbCoder in the Readme:

module JSONCoder
  extend self

  def load(data)
    data || {}
  end

  def dump(data)
    data || {}
  end
end

Ruby: 2.5.0

I had a quick dig and get a little overwhelmed. Happy hear your thoughts on this. Cheers!

DLawla avatar Mar 12 '18 23:03 DLawla

Do you have the entire backtrace? That can help us to find where that method is being called.

rafaelfranca avatar Mar 16 '18 02:03 rafaelfranca

Ah, I see what is happening. Since this gem don't support Rails 6 yet, bundle may had downgraded you to an incompatible version. ActiveRecord::TypedStore::Column don't exist anymore in the current version.

rafaelfranca avatar Mar 16 '18 03:03 rafaelfranca

Ah okay, good to know. Glad you are aware of this then.

DLawla avatar Mar 16 '18 03:03 DLawla

@rafaelfranca, do you have an idea when we could expect Rails 6 support?

DLawla avatar Mar 16 '18 03:03 DLawla

Not really, Rails 6 code right now is almost the same as 5.2, so there is no rush for us to support. But maybe in a few weeks we will add support.

rafaelfranca avatar Mar 16 '18 03:03 rafaelfranca

Support for rails 6 would be great! I'm working on a project with rails 6 that relies heavily on this gem.. its gonna be a beast to refactor the project.. Do you have any ideas on a timeline for rails 6 compatibility?

TheMindlessDev avatar Mar 11 '19 05:03 TheMindlessDev