Module: ActsAsHashids::Core

Extended by:
ActiveSupport::Concern
Defined in:
lib/acts_as_hashids/core.rb

Defined Under Namespace

Modules: ClassMethods, FinderMethods

Instance Method Summary collapse

Instance Method Details

#to_paramObject



7
8
9
10
# File 'lib/acts_as_hashids/core.rb', line 7

def to_param
  id = public_send(self.class.primary_key)
  id && self.class.hashids.encode(id)
end