Work around removal of "to_h" method in Rails 7.0
As mentioned in #44 and #42
We've been getting this issue in Planet OpenSUSE and it's holding the repo back from using more modern Ruby + ActiveRecord versions. Hopefully this helps bring this repo's version compatibility up to date :)
https://github.com/openSUSE/planet-o-o/actions/runs/8309794922/job/22741562517#step:5:12
@bmos thanks to start with updgrading to active record (from rails) 7.0
configurations = ActiveRecord::Base.configurations.configs_for(env_name: 'pluto')
that looks like the new magic to use. i will set aside some days this march 2024 to upgrade the pluto machinery to ruby 3+ and activerecord 7. thanks for the patience and thanks for trying / using pluto.
@bmos fyi: sorry for the long wait. i try some scripts to figure out how to configue ActiceRecord in latest versions (v7+) without the standard yaml files. it was a kind of "hack" and there must/should be an official way. i will report back. update - here's the first test / debug script -> https://github.com/feedreader/pluto/blob/master/sandbox/debug_connect.rb
note - not sure if anyone needs a named db config anyway. i guess it was originally for the (online) pluto admin addon (NOT used if you only do static generation), thus, to keep it simple i remove the db config registration for now and push / upload a new pluto gem.
update - fyi - a new gem published with the activerecord db config changes is now published, see https://rubygems.org/gems/pluto-models/versions/1.6.3