# RE: Rails urls & the AWD book

**URL:** <https://www.ruby-forum.com/t/re-rails-urls-the-awd-book/54086>\
**Category:** Rails\
**Created:** [February 22, 2006, 6:34pm UTC](https://www.ruby-forum.com/t/re-rails-urls-the-awd-book/54086 "2006-02-22T18:34:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve\_Chanin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e274bd/32.png) [@Steve\_Chanin](https://www.ruby-forum.com/u/Steve_Chanin)\
**Post date:** [February 22, 2006, 6:34pm UTC](https://www.ruby-forum.com/t/re-rails-urls-the-awd-book/54086/1 "2006-02-22T18:34:44Z")

</div>

Bill,

I remember running into the same problem with the book. Here is an  
errata from the web site … basically the validation is broken:

#896: The suggested image url is relative /images/sk\_auto\_small.jpg but  
the validation requires a full url starting with http.

(Dave says: I’m going to tidy all that up in the next edition: it was a  
change made at the suggestion of a reviewer, but in retrospect I regret  
it)

```
http://books.pragprog.com/titles/rails/errata

```

-Steve

* * *

```
From: removed_email_address@domain.invalid

```

[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Bill W.  
Sent: Sunday, February 19, 2006 2:44 PM  
To: removed\_email\_address@domain.invalid  
Subject: [Rails] Rails urls & the AWD book

```
Greetings!

I'm having a hard time understanding the way Rails handles urls.

```

I’m specifically having real trouble with the image\_urls in the Depot  
app in the Agile Web D. book.

```
If I enter "\image\file.png" in the Add Product page, the image

```

is displayed in the other views and Properties shows  
[http://localhost:3000/images/file.png](http://localhost:3000/images/file.png)  
If I leave off the leading backslash and enter “image\file.png”  
the image does not display and Properties shows  
[http://localhost:3000/admin/images/file.png](http://localhost:3000/admin/images/file.png) when I look at it from the  
admin\_controller or [http://localhost:3000/store/images/file.png](http://localhost:3000/store/images/file.png) when I  
look at it from the store\_controller.

```
In either case, the validation the book shows for image_url

```

really trips me up because it’s checking to see that the string begins  
with “http:”. What’s up with that?

```
Also, when I'm supplying the location in the unit test I'm

```

having to use a string I really don’t understand. The string is:  
“c:\instantrails\rails\_apps\depot\public\images\rails.png”  
Why do some of the '' characters have to be escaped and others  
not? Or is that not what’s going on?

```
Could someone help? At least point me to some docs on this

```

topic?

```
Thanks,
Bill

```
