# External link with parameters

**URL:** <https://www.ruby-forum.com/t/external-link-with-parameters/146935>\
**Category:** Rails\
**Created:** [August 26, 2008, 10:29pm UTC](https://www.ruby-forum.com/t/external-link-with-parameters/146935 "2008-08-26T22:29:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gwendydd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b5e925/32.png) [@gwendydd](https://www.ruby-forum.com/u/gwendydd)\
**Post date:** [August 26, 2008, 10:29pm UTC](https://www.ruby-forum.com/t/external-link-with-parameters/146935/1 "2008-08-26T22:29:14Z")

</div>

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, [bn:0151327653 - Search Results](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!

---

<div class="post-metadata">

**Author:** ![gwendydd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b5e925/32.png) [@gwendydd](https://www.ruby-forum.com/u/gwendydd)\
**Post date:** [August 26, 2008, 10:43pm UTC](https://www.ruby-forum.com/t/external-link-with-parameters/146935/2 "2008-08-26T22:43:51Z")

</div>

Morgan K. 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, [bn:0151327653 - Search Results](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

“[URL.ORGanizer: Store, share and tag your favourite links](http://www.url.org/#%7B@yourNumber%7D)”

---

<div class="post-metadata">

**Author:** ![gwendydd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b5e925/32.png) [@gwendydd](https://www.ruby-forum.com/u/gwendydd)\
**Post date:** [August 26, 2008, 11:17pm UTC](https://www.ruby-forum.com/t/external-link-with-parameters/146935/3 "2008-08-26T23:17:42Z")

</div>

> “[URL.ORGanizer: Store, share and tag your favourite links](http://www.url.org/#%7B@yourNumber%7D)”

Yep, that works - I didn’t realize I could pass data into a string like  
that. Thank you!
