FreeBSD.software
Home/www/rubygem-emk-sinatra-url-for

rubygem-emk-sinatra-url-for

0.2.1

Construct absolute paths and full URLs for a Sinatra application

sinatra-url-for constructs absolute paths and full URLs for handlers in a Sinatra application. Assuming that your application is running on example.com, and that it has been mapped to /myapp, you should be able call url_for from within a handler as follows: url_for "/" # Returns "/myapp/" url_for "/foo" # Returns "/myapp/foo" url_for "/foo", :full # Returns "http://example.com/myapp/foo"

Origin: www/rubygem-emk-sinatra-url-for
Category: www
Size: 6.53KiB
License: MIT
Maintainer: ruby@FreeBSD.org
Dependencies: 3 packages
Required by: 1 packages
$pkg install rubygem-emk-sinatra-url-for

Dependencies (3)

Required By (1 packages)

More in www