From: Etienne Vallette d'osia Date: 2009-08-13T22:40:33+09:00 Subject: Re: noob question on combining variables bingo bob wrote: > > How does that work? Sorry not clear. > > All I'm trying to do is get the count (which will be 1, 2 or 3) included > on the end of the "image_" > > bb resort.send(:"image_#{file_count}=", photo_file) - you can't build a variable name in ruby, if you want to do this, use hashes - :"" is a short form of "".intern (or "".to_sym) - a.b can be written a.send(:b) - when you write "a.b = 3", you call the method "b=" of the object a with the argument 3. Etienne -- Posted via http://www.ruby-forum.com/.