Four Days on Rails

I’ve been reading the tutorial and I have problems with the TinyInt(1)
for the attribute “item.done”. I thought this thread would be the best
to post it. I’m using Rails 1.1.14. When in the partial template
_list_stripes appears:
<%= list_stripes[“done”] == 1 ? show_image(“done_ico.gif”) : " "
%>

it always returns the &nbsp. This is cause I think Rails now considers
tinyint(1) as a boolean, so to make this works the sentence may be
changed to:
<%= list_stripes[“done”] == true Â?


LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com

Damaris F. wrote:

I’ve been reading the tutorial and I have problems with the TinyInt(1)
for the attribute “item.done”. I thought this thread would be the best
to post it. I’m using Rails 1.1.14. When in the partial template
_list_stripes appears:
<%= *list_stripes[“done”] == 1 ? **show_image(“done_ico.gif”) :
" " *%>
it always returns the &nbsp. This is cause I think Rails now considers
tinyint(1) as a boolean, so to make this works the sentence may be
changed to:
<%= list_stripes[“done”] == true ?
You are right! You may want to read this post of mine for this and
certain other issues that you will encounter :slight_smile:
http://www.nabble.com/Errata-in-the-“Four-Days-with-Rails”-p4766038.html

Cheers,
Mohit.

MMM…thanks! I was wondering why my destroys didn’t work!! I had to
change the destroy methods to “def delete” instead… :slight_smile:
Thanks :slight_smile:

Mohit S. [email protected] escribió:
Damaris F. wrote:

I’ve been reading the tutorial and I have problems with the TinyInt(1)
for the attribute “item.done”. I thought this thread would be the best
to post it. I’m using Rails 1.1.14. When in the partial template
_list_stripes appears:

" " *%>
it always returns the . This is cause I think Rails now considers
tinyint(1) as a boolean, so to make this works the sentence may be
changed to:


“Antes de rendirnos, fuimos eternos.” Recuerdo, I.S.



LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com

Glad it helps :slight_smile:
Cheers
Mohit.