Sha256: c89ec36e093f4dc0299fbc0f74a1b4061327c6dace953e6d57a0922e69fccd4d
Contents?: true
Size: 790 Bytes
Versions: 2
Compression:
Stored size: 790 Bytes
Contents
# frozen_string_literal: true module Hashid module Rails class Configuration attr_accessor :alphabet, :hashid_prefix_separator, :min_hash_length, :override_find, :salt, :sign_hashids, :use_prefix def initialize @salt = "" @min_hash_length = 6 @alphabet = "abcdefghijklmnopqrstuvwxyz" \ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \ "1234567890" @override_find = true @sign_hashids = true @use_prefix = true @hashid_prefix_separator = "!" end def for_table(table_name) ["#{table_name}#{salt}", min_hash_length, alphabet] end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
chimeon-hashid-rails-1.3.3 | lib/hashid/rails/configuration.rb |
chimeon-hashid-rails-1.3.2 | lib/hashid/rails/configuration.rb |