diff options
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rwxr-xr-x | actionpack/lib/action_controller/request.rb | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 2da77a2144..e16694068e 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -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 diff --git a/actionpack/lib/action_controller/request.rb b/actionpack/lib/action_controller/request.rb index 1085066ea0..f54a00dd86 100755 --- a/actionpack/lib/action_controller/request.rb +++ b/actionpack/lib/action_controller/request.rb @@ -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 |