I have a Sinatra application with the following GET method that takes the URL passed in:
get %r{/html/(.+)} do
url = params[:captures] # stores url => http://www.example.com
gethtml(url)
end
However, when gethtml(url) is called, it raises the error Sinatra no implicit conversion of Array into String.
gethtml accepts input such as http://example.com.
I know this is a data-type conversion issue and I tried calling to_s but it did not work.
Any help would be appreciated.