9 10 11
# File 'app/models/dataclips/insight.rb', line 9 def self.find_by_hash_id(hash_id) find_by(id: Dataclips.hashids.decode(hash_id)) end
13 14 15 16
# File 'app/models/dataclips/insight.rb', line 13 def hash_id return unless persisted? Dataclips.hashids.encode(id) end
5 6 7
# File 'app/models/dataclips/insight.rb', line 5 def to_param hash_id end