obfuscate_id
obfuscate_id copied to clipboard
class.find_by() not working
It seems that only find method is working when using obfuscated ids, thus not allowing to respond with nil if object is not found in the database. could you please fix that?
EDIT: Never mind. though I might suggest tweaking find method to accept another parameter "obfuscated" because keeping track of where the ids are normal and where they are scrambled is quite hard.
Hi @LeKristapino ,
Since just the find
method is overrided, find_by
will work only with regular IDs.
Since this repository is kind deprecated, I created a gem to do that: https://github.com/wbotelhos/idy
I would love your feedback.