lib/hashid/rails.rb in hashid-rails-0.6.0 vs lib/hashid/rails.rb in hashid-rails-0.7.0
- old
+ new
@@ -61,10 +61,14 @@
hashid_decode(ids)
end
end
def find(hashid)
- model_reload? ? super(hashid) : super(decode_id(hashid) || hashid)
+ if model_reload? || Hashid::Rails.configuration.disable_find
+ super(hashid)
+ else
+ super(decode_id(hashid) || hashid)
+ end
end
def find_by_hashid(hashid)
find_by!(id: hashid_decode(hashid))
end