Module: ActiveRecord::HashidsUri::InstanceMethods
- Defined in:
- lib/hashids_uri.rb
Instance Method Summary collapse
Instance Method Details
#generate_hashid ⇒ Object
48 49 50 51 52 53 |
# File 'lib/hashids_uri.rb', line 48 def generate_hashid ::Hashids.new( salt, min_length ).encode(id) end |
#min_length ⇒ Object
44 45 46 |
# File 'lib/hashids_uri.rb', line 44 def min_length self.class.min_length end |
#salt ⇒ Object
40 41 42 |
# File 'lib/hashids_uri.rb', line 40 def salt self.class.salt end |
#to_param ⇒ Object
55 56 57 |
# File 'lib/hashids_uri.rb', line 55 def to_param hashid end |