ruby rails de la conversion des params de tableau int

Je suis l'envoi de données via get et j'ai besoin de le mettre dans un tableau int pour être utilisé dans une recherche.
voici mon code :

@found = Array.new
  params['candidate'].each do |c|
  @found << c.to_i
  end

L'adresse de ma page ressemble à ceci

http://localhost:3000/export/candidate?candidate[]=3&candidate[]=4&commit=Export

Si cela fait une différence, je suis à l'aide de cette trouvaille

@candidate = Candidate.find(:all, :conditions => ["candidates.id IN ?", @found]) 

Mais actuellement, il ne la mets pas dans un vrai tableau, car j'ai cette erreur

Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '4)' at line 1: SELECT * FROM `candidates` WHERE (candidates.id IN 4,2)

Les crochets sont manquants dans le tableau

Merci et bonne matinée!

Alex

InformationsquelleAutor Alex | 2010-07-18