Method: LHS::Record::Endpoints::ClassMethods#find_endpoint
- Defined in:
- lib/lhs/concerns/record/endpoints.rb
#find_endpoint(params = {}) ⇒ Object
Find an endpoint based on the provided parameters. If no parameters are provided it finds the base endpoint otherwise it finds the endpoint that matches the parameters best.
43 44 45 46 47 |
# File 'lib/lhs/concerns/record/endpoints.rb', line 43 def find_endpoint(params = {}) endpoint = find_best_endpoint(params) if params && params.keys.count > 0 endpoint ||= find_base_endpoint endpoint end |