lib/elsmore/url.rb in elsmore-0.2.1 vs lib/elsmore/url.rb in elsmore-0.3.0

- old
+ new

@@ -34,9 +34,17 @@ else canonical_url end end + def resource_path + if parent && parent.host == host + uri.path + else + canonical_url.gsub('http:/', '').gsub('https:/', '') + end + end + private def sanitize_string if raw_url.start_with?('//') self.raw_url = "http:#{raw_url}"