From: Panagiotis Atmatzidis Date: 2012-12-14T03:50:13+09:00 Subject: Re: Database query Hello, On 13 Δεκ 2012, at 19:39 , cristian cristian wrote: > Hi! > Yes! 7Studs code works perfectly. But I changed the code to work as I > want it and that doesnt work (see my prev comment) probably because I > dont know what Im doing :) I installed Datamapper by the way. Your code is 'correct' syntactically but not 'semantically' :-) Take a look here: https://gist.github.com/4278643 Works fine. the problem is that your value when it comes out of the database is not a 'string' while your '7' is a string... So you're matching a number(?) with a string which will never work :-) > > Br > cristian > > -- > Posted via http://www.ruby-forum.com/. > Panagiotis (atmosx) Atmatzidis email: atma@convalesco.org URL: http://www.convalesco.org GnuPG ID: 0xE736C6A0 gpg --keyserver x-hkp://pgp.mit.edu --recv-keys 0xE736C6A0 -- The wise man said: "Never argue with an idiot. They bring you down to their level and beat you with experience."