# Two more dumb noob questions

**URL:** <https://www.ruby-forum.com/t/two-more-dumb-noob-questions/69832>\
**Category:** Rails\
**Created:** [September 24, 2006, 9:00pm UTC](https://www.ruby-forum.com/t/two-more-dumb-noob-questions/69832 "2006-09-24T21:00:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [September 24, 2006, 9:00pm UTC](https://www.ruby-forum.com/t/two-more-dumb-noob-questions/69832/1 "2006-09-24T21:00:23Z")

</div>

Hello all,  
Sorry for flooding the list with silly questions lately, but I’m having  
some difficulty with some basic concepts in Rails.

1. What is the difference between an item prefixed with a colon and one  
without (as in :class =\> “test” vs class =\> test). I think there’s a  
major concept I’m missing out on here, as this problem nails me  
frequently.
2. How in the world do I make an image link? I know how to do it in  
HTML, but how the heck do I nest calls to helpers? In this case I’d be  
using the \<%= image\_tag … %\> inside of a \<%link\_to…%\>. How do I do  
this?

Thanks,  
Will

* * *

Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+  
countries) for 2Â¢/min or less.

---

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [September 24, 2006, 9:32pm UTC](https://www.ruby-forum.com/t/two-more-dumb-noob-questions/69832/2 "2006-09-24T21:32:26Z")

</div>

An item prefixed with a colon is a symbol. It’s sort of like a string.  
“class” =\> “test”, :class =\> “test”, etc. Without a colon prefixed, it  
would  
be a variable.

\<%= link\_to image\_tag(“image.jpg”), :controller =\> ‘main’, :action =\>  
‘index’ %\>  
just like,  
\<%= link\_to “Text”, :controller =\> ‘main’, :action =\> ‘index’ %\>

Just replace the text that you want to link to with your image\_tag.

You might want to read a few basic texts on Ruby before starting out.  
Why’s  
guide is a good intro (and fun), or the first edition of the Pickaxe is  
also  
available online, and it provides a good enough “textbookish” coverage.

Vish

---

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [September 24, 2006, 9:52pm UTC](https://www.ruby-forum.com/t/two-more-dumb-noob-questions/69832/3 "2006-09-24T21:52:30Z")

</div>

Cool. Thanks man. Do you have a link for the pickaxe book?

Vishnu G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote: An item prefixed with a colon  
is a symbol. It’s sort of like a string. “class” =\> “test”, :class =\>  
“test”, etc. Without a colon prefixed, it would be a variable.

\<%= link\_to image\_tag(" image.jpg"), :controller =\> ‘main’, :action =\>  
‘index’ %\>  
just like,  
\<%= link\_to “Text”, :controller =\> ‘main’, :action =\> ‘index’ %\>

Just replace the text that you want to link to with your image\_tag.

You might want to read a few basic texts on Ruby before starting out.  
Why’s guide is a good intro (and fun), or the first edition of the  
Pickaxe is also available online, and it provides a good enough  
“textbookish” coverage.

Vish

On 9/25/06, Will G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote: Hello all,  
Sorry for flooding the list with silly questions lately, but I’m having  
some difficulty with some basic concepts in Rails.

1. What is the difference between an item prefixed with a colon and one  
without (as in :class =\> “test” vs class =\> test). I think there’s a  
major concept I’m missing out on here, as this problem nails me  
frequently.
2. How in the world do I make an image link? I know how to do it in  
HTML, but how the heck do I nest calls to helpers? In this case I’d be  
using the \<%= image\_tag … %\> inside of a \<%link\_to…%\>. How do I do  
this?

Thanks,  
Will

* * *

Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+  
countries) for 2Â¢/min or less.

(What is best in life?) To crush your enemies, see them driven before  
you, and to hear the lamentations of the women. - Conan the Barbarian

* * *

All-new Yahoo! Mail - Fire up a more powerful email and get things done  
faster.

---

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [September 25, 2006, 12:00am UTC](https://www.ruby-forum.com/t/two-more-dumb-noob-questions/69832/4 "2006-09-25T00:00:44Z")

</div>

On 9/24/06, Will G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Cool. Thanks man. Do you have a link for the pickaxe book?

[http://www.rubycentral.com/book/](http://www.rubycentral.com/book/)
