to_param()
Instance Public methods
Returns a string
representing the object's key suitable
for use in URLs, or nil
if persisted?
is
false
.
1 2 3 4 5 | class Person < ActiveRecord::Base end person = Person.create person.to_param # => "1" |
Please login to continue.