Pras
2006-Apr-25 07:42 UTC
[Rails] undefined method `to_url'' for "This is my weblog":String
Hi, In my application I cant use "to_url" method on any of strings. What should I do if i want to use this method? Is there any plugin needed to download for this "to_url". In my application now when I am trying to use this methos I am getting following error:- =======================================undefined method `to_url'' for "This is my weblog":String ======================================= PLease tell me. Thanx in advance. Prash -- Posted via http://www.ruby-forum.com/.
Pete Yandell
2006-Apr-27 01:00 UTC
[Rails] undefined method `to_url'' for "This is my weblog":String
The error message is right: String doesn''t have a to_url method. Where did you read about this method, and what do you expect it to do? On 25/04/2006, at 5:41 PM, Pras wrote:> Hi, > > In my application I cant use "to_url" method on any of strings. What > should I do if i want to use this method? Is there any plugin > needed to > download for this "to_url". In my application now when I am trying to > use this methos I am getting following error:- > =======================================> undefined method `to_url'' for "This is my weblog":String > =======================================> > PLease tell me. > > Thanx in advance. > > Prash > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Alex Wayne
2006-Apr-27 01:21 UTC
[Rails] Re: undefined method `to_url'' for "This is my weblog":String
Pras wrote:> Hi, > > In my application I cant use "to_url" method on any of strings. What > should I do if i want to use this method? Is there any plugin needed to > download for this "to_url". In my application now when I am trying to > use this methos I am getting following error:- > =======================================> undefined method `to_url'' for "This is my weblog":String > =======================================> > PLease tell me. > > Thanx in advance. > > PrashYou can add one to String if you like class String def to_url #Do some stuff to a string end end -- Posted via http://www.ruby-forum.com/.