You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying with the new hashid_config, as I have just renamed a table that I has using with hashid-rails setting the pepper on the model. I love the functionality. Unfortunately it does not work when querying an ActiveRecord_Relation.
The hashid_config parameters are set using the model parameters correctly as long as the model is queried directly, eg:
Post.hashid_configuration
=> returns correct pepper that is set in the model
But when if the ActiveRecord_Relation is in between it does not work, eg:
Post.all.hashid_configuration
=> returns the original table_name as pepper (overriding the one set on the model)
The hashid_config gets called on the ActiveRecord_Relation, and the options are empty.
This means that this works
Post.find("hashid")
but this doesn't
Post.includes(:comments).find("hashid")
The text was updated successfully, but these errors were encountered:
I have been trying with the new
hashid_config
, as I have just renamed a table that I has using withhashid-rails
setting the pepper on the model. I love the functionality. Unfortunately it does not work when querying anActiveRecord_Relation
.The
hashid_config
parameters are set using the model parameters correctly as long as the model is queried directly, eg:But when if the
ActiveRecord_Relation
is in between it does not work, eg:The hashid_config gets called on the
ActiveRecord_Relation
, and theoptions
are empty.This means that this works
but this doesn't
The text was updated successfully, but these errors were encountered: