Added Request#ssl? which is shorthand for @request.protocol == "https://"

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2004-11-24 19:46:30 +00:00
parent e0b904e74f
commit 1042de2370
2 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,7 @@
*CVS*
* Added Request#ssl? which is shorthand for @request.protocol == "https://"
* Added the choice to call form_tag with no arguments (resulting in a form posting to current action) [bitsweat]
* Upgraded to Builder 1.2.1

View File

@ -54,6 +54,10 @@ module ActionController
port == 443 ? "https://" : "http://"
end
def ssl?
protocol == "https://"
end
def path
request_uri ? request_uri.split("?").first : ""
end