model_probe
model_probe copied to clipboard
`<Model>.probe` crashes on indexed `lower` text
Thank you for this gem, it makes my life easier 🤗
When running User.probe
the code crashes on a "lower case text index" index the DDL managed to output:
CREATE INDEX index_users_on_lower_address_city ON public.users USING btree (lower((address_city)::text));
My schema defines this index as:
t.index "lower((address_city)::text)", name: "index_users_on_lower_address_city"
The error:
index_users_on_lower_address_city [/Users/<user>/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/model_probe-1.1.3/lib/model_probe/probes/indexes.rb:19:in 'probe_index': undefined method 'each_with_index' for an instance of String (NoMethodError)
Rails 7.1.2 Ruby 3.3.0 PostgreSQL 13