Sean,

Are you saving this url to the model?  I'm not sure what you mean by
shorten it up?

--Tom

On May 28, 8:16 am, Sean Six <[email protected]> wrote:
> Mukund wrote:
> > require 'uri'
>
> >   uri = URI.parse("http://www.ruby-lang.org/";)
> >   p uri
> >   # => #<URI::HTTP:0x202281be URL:http://www.ruby-lang.org/>
> >   p uri.scheme
> >   # => "http"
> >   p uri.host
> >   # => "www.ruby-lang.org"
>
> >http://www.ruby-doc.org/core/classes/URI.html
>
> This is a little harder than I expected.  So I include the require 'uri'
> in the model.  Then it seems I need to parse the host part of the uri.
> How do I parse this?  Do I need to use a RegExpression?
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to