Module: DHS::Record::HrefFor::ClassMethods

Defined in:
lib/dhs/concerns/record/href_for.rb

Instance Method Summary collapse

Instance Method Details

#href_for(args = nil) ⇒ Object Also known as: url_for



11
12
13
14
15
# File 'lib/dhs/concerns/record/href_for.rb', line 11

def href_for(args = nil)
  return unless [Integer, String].include?(args.class)
  params = { id: args }
  find_endpoint(params).compile(params)
end