I have a database of books that includes ISBN numbers. On Worldcat''s website, it is really easy to get a URL for a book if you have the ISBN number. For instance, http://www.worldcat.org/isbn/0151327653. I would like to be able to take the ISBN number from my database and put it into a link in the record view. I know how to use link_to to link to external sites, and to generate links to actions in the database, but how can I make a link to an external site that includes data from my database? All help is greatly appreciated! -- Posted via http://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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Morgan Kay wrote:> I have a database of books that includes ISBN numbers. On Worldcat''s > website, it is really easy to get a URL for a book if you have the ISBN > number. For instance, http://www.worldcat.org/isbn/0151327653. > > I would like to be able to take the ISBN number from my database and put > it into a link in the record view. I know how to use link_to to link to > external sites, and to generate links to actions in the database, but > how can I make a link to an external site that includes data from my > database? > > All help is greatly appreciated!i guess if you create a string with the url will work... like this "http://www.url.org/#{@yourNumber}" -- Posted via http://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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> "http://www.url.org/#{@yourNumber}"Yep, that works - I didn''t realize I could pass data into a string like that. Thank you! -- Posted via http://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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---