Method: ApiResource::Base#to_param

Defined in:
lib/api_resource/base.rb

#to_paramObject



598
599
600
601
602
# File 'lib/api_resource/base.rb', line 598

def to_param
  # Stolen from active_record.
  # We can't use alias_method here, because method 'id' optimizes itself on the fly.
  id && id.to_s # Be sure to stringify the id for routes
end