public
Rubygem
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-core.git
Rename url_with_host to absolute_url

Also add alias relative_url for url
ivey (author)
Sat Mar 22 08:42:57 -0700 2008
commit  9858e69815a3a92ca72129c90bdb2442d5e8d879
tree    66ac56d824641ae940fee9c56090e424809c8b18
parent  b6b9b4a3477901c83752028df9252d6f4d8561e7
...
411
412
413
414
 
 
415
416
417
...
422
423
424
425
426
 
 
427
428
 
429
430
431
...
527
528
529
530
531
 
...
411
412
413
 
414
415
416
417
418
...
423
424
425
 
 
426
427
428
 
429
430
431
432
...
528
529
530
 
531
532
0
@@ -411,7 +411,8 @@ class Merb::AbstractController
0
     uri = Merb::Config[:path_prefix] + uri if Merb::Config[:path_prefix]
0
     uri
0
   end
0
-  
0
+  alias_method :relative_url, :url
0
+
0
   # ==== Parameters
0
   # name<~to_sym, Hash>:: The name of the URL to generate.
0
   # rparams<Hash>:: Parameters for the route generation.
0
@@ -422,10 +423,10 @@ class Merb::AbstractController
0
   # ==== Alternatives
0
   # If a hash is used as the first argument, a default route will be
0
   # generated based on it and rparams.
0
-  def url_with_host(name, rparams={})
0
-    uri =  request.protocol + request.host + url(name, rparams)
0
+  def absolute_url(name, rparams={})
0
+    request.protocol + request.host + url(name, rparams)
0
   end
0
-  
0
+
0
   private
0
   # ==== Parameters
0
   # filters<Array[Filter]>:: The filter list that this should be added to.
0
@@ -527,4 +528,4 @@ class Merb::AbstractController
0
     return @_merb_partial_locals[sym] if @_merb_partial_locals && @_merb_partial_locals.key?(sym)
0
     super
0
   end  
0
-end
0
\ No newline at end of file
0
+end

Comments