Class: Insightly2::Utils::UrlHelper
- Inherits:
-
Object
- Object
- Insightly2::Utils::UrlHelper
- Defined in:
- lib/insightly2/utils/url_helper.rb
Class Method Summary collapse
-
.build_url(path: nil, params: nil) ⇒ UrlHelper
Build a URL with a querystring containing optional params if supplied.
Class Method Details
.build_url(path: nil, params: nil) ⇒ UrlHelper
Build a URL with a querystring containing optional params if supplied.
8 9 10 11 12 13 14 |
# File 'lib/insightly2/utils/url_helper.rb', line 8 def self.build_url(path: nil, params: nil) params.delete_if {|k,v| v.blank?} params = params.to_query query = path query << ("?" + params) unless params.blank? query end |