Module: LHS::Record::HrefFor::ClassMethods

Defined in:
lib/lhs/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/lhs/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