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  . 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060805/4efedc73/attachment.html
Damaris Fuentes 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  . 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 :-) http://www.nabble.com/Errata-in-the-%22Four-Days-with-Rails%22-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... :) Thanks :) Mohit Sindhwani <mo_mail@onghu.com> escribi?: Damaris Fuentes 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060805/ab7956a8/attachment-0001.html
Glad it helps :) Cheers Mohit. Damaris Fuentes wrote:> MMM....thanks! I was wondering why my destroys didn''t work!! I had to > change the destroy methods to "def delete" instead... :) > Thanks :) > > */Mohit Sindhwani <mo_mail@onghu.com>/* escribi?: > > Damaris Fuentes 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 . This is cause I think Rails now considers > > tinyint(1) as a boolean, so to make this works the sentence may be > > changed to: > > >