[Rails] How to encode URLs?
softwareengineer 99
softwareengineer99 at yahoo.com
Mon Jan 30 19:09:55 GMT 2006
I found the answer.
Use <%= u("l o p o ") %>
Thanks
Frank
softwareengineer 99 <softwareengineer99 at yahoo.com> wrote: Thank you Adam for your reply.
If I am encoding a string "l o p o", then the Base64.encode64 will convert it to bCBvIHAgbyA=.
I am looking for a function similar to PHP's urlencode which will convert "l o p o" to "l+o+p+o" or "l%20o%20p%20o"
Thanks
Frank
Adam Denenberg <straightflush at gmail.com> wrote: require 'base64'
Base64.encode64(url)
adam
On 1/30/06, softwareengineer 99 wrote:
> How does one encode URLs in ROR?
>
> Thanks
> Frank
>
>
> ________________________________
> Bring words and photos together (easily) with
> PhotoMail - it's free and works with Yahoo! Mail.
>
>
> _______________________________________________
> Rails mailing list
> Rails at lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>
_______________________________________________
Rails mailing list
Rails at lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails
---------------------------------
Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more on new and used cars._______________________________________________
Rails mailing list
Rails at lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails
---------------------------------
Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more on new and used cars.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060130/1dcbcba9/attachment-0001.html
More information about the Rails
mailing list