Module: ActiveRecord::HashidsUri::InstanceMethods
- Defined in:
- lib/hashids_uri.rb
Instance Method Summary collapse
Instance Method Details
#hashid ⇒ Object
45 46 47 48 49 50 |
# File 'lib/hashids_uri.rb', line 45 def hashid ::Hashids.new( salt, min_length ).encode(id) end |
#min_length ⇒ Object
41 42 43 |
# File 'lib/hashids_uri.rb', line 41 def min_length self.class.min_length end |
#salt ⇒ Object
37 38 39 |
# File 'lib/hashids_uri.rb', line 37 def salt self.class.salt end |
#to_param ⇒ Object
52 53 54 |
# File 'lib/hashids_uri.rb', line 52 def to_param hashid end |