Ruby on Rails 7.1.3.4 Module ActiveRecord::Integration::ClassMethods activerecord/lib/active_record/integration.rb Defines your model’s to_param method to generate “pretty” URLs using method_name, which can be any attribute or method that responds to to_s. class User < ActiveRecord::Base to_param :name end user = User.find_by(name: 'Fancy Pants') user.id # => 123 user_path(user) # => "/users/123-f