Method: Identifiable::Model#to_param

Defined in:
lib/identifiable/model.rb

#to_paramObject

By overriding ActiveRecord’s #to_param, this means that Rails’ helpers, such as the link_to helpers will default to using the public ID instead of the regular ID when identifying the record.



134
135
136
# File 'lib/identifiable/model.rb', line 134

def to_param
  self[self.class.identifiable_column]
end