Module: HasUniqueIdentifier::InstanceMethods

Extended by:
ActiveSupport::Concern
Defined in:
lib/has_unique_identifier/instance_methods.rb

Constant Summary collapse

DEFAULT_RANDOM_IDENTIFIER_LENGTH =
24

Instance Method Summary collapse

Instance Method Details

#to_paramObject



7
8
9
10
11
12
13
14
# File 'lib/has_unique_identifier/instance_methods.rb', line 7

def to_param
  if self.class.unique_identifier &&
    self.class.unique_identifier.options[:to_param] == true

    return send(self.class.unique_identifier.name)
  end
  super
end