impressionist
impressionist copied to clipboard
Using counter_cache without params[:id]
One of the models in my app uses a uuid in its show route instead of an id, so when I enable counter_cache, nothing happens. Are there any workarounds for this kind of setup?
@franktisellano - see URL below
https://github.com/charlotte-ruby/impressionist/wiki/Impressionist-and-vanity-URLs-(working-with-models-that-use-to_param)
I also ran into same issue.
If all of the relevant models use uuid as an id,
changing type of impressions.impressionable_id and impressions.user_id to uuid works for me.
Above link seems unrelated.