thx again for your time JD. I did dry the code snippets you gave me, and i also searched the web for the methods of CGI, and couldn't find it anywhere, including on railsguides.com and at railsapi.com, which served me fine up till now.
where should i get the fucntions for CGI? Can ri show them to me?How do i do that? if i understand correctly, regarding the link business : first 1) the helper file for products:(the ONLY place where I wanna use it) requre 'cgi def format_string_for_google(query) CGI.escape(query) end 2)the show.html.erb <%=link_to "google it", ""http://www.google.com /search? hl=en"as_q=&"as_epq=" + format_string_for_google(@product.author)" Is this code here of any good to my problem? a billion thx in advance, radu On Jan 27, 6:08 pm, Alpha Blue <li...@ruby-forum.com> wrote: > Test this out in IRB so you can see what happens: > > irb > require 'cgi' > puts CGI.escape( "J.R.R. Tolkien" ) > puts CGI.escape( "Jack Daniels" ) > > You can create a simple helper file that does the formatting for you and > then use a simple link_tag method to submit the link to google with the > helper. > > If you don't understand what I'm saying here then you are not ready to > do this type of event in rails. You should read up on the very basics > for using rails athttp://guides.rubyonrails.org/. > > Take care, > > JD > -- > 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.