instance method
to_param
Ruby on Rails 3.2.22.5
Since v3.0.20Signature
to_param()
Returns a string representing the object’s key suitable for use in URLs, or nil if persisted? is false.
Source
# File activemodel/lib/active_model/conversion.rb, line 51
def to_param
persisted? ? to_key.join('-') : nil
end
Defined in activemodel/lib/active_model/conversion.rb line 51
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Conversion