Sha256: dcee1069eade08aac4bcebb2fb257d3132bbe31721377eee04644b248e686f98
Contents?: true
Size: 313 Bytes
Versions: 7
Compression:
Stored size: 313 Bytes
Contents
# frozen_string_literal: true module EncodedId module Rails module QueryMethods def where_encoded_id(slugged_encoded_id) decoded_id = decode_encoded_id(slugged_encoded_id) raise ActiveRecord::RecordNotFound if decoded_id.nil? where(id: decoded_id) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems