I have something like this:
for xx in '01'..'09'
  field_name='field'+xx
  puts ModelName.field_name
end

My problem is that ModelName has no field named field_name, it have
fields like field01, field02,...,field09. So, how do I transform a
string in a field name?

It might be a trivial solution, but I can't find it. I would
appreciate any help.


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to