On 14 May 2010 19:24, Viorel <viorelvl...@gmail.com> wrote: > 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? > >
puts ModelName.send(field_name) -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.