On May 14, 9:26 pm, Joshua Martin <josmar52...@gmail.com> wrote: > What exactly are you trying to do with this? I am trying to access these fields > > > > > > On Fri, May 14, 2010 at 2:24 PM, Viorel <viorelvl...@gmail.com> wrote: > > 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 rubyonrails-t...@googlegroups.com. > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2Bunsubscrib > > e...@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- > _________________________________ > > Joshua S. Martin > > CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s), > contains information that may be confidential, protected by the attorney > client or other legal privileges, and or proprietary non public information. > If you are not an intended recipient of this message or an authorized > assistant to an intended recipient, please notify the sender by replying to > this message and then delete it from your system. Use, dissemination, > distribution, or reproduction of this message and or any of its attachments > (if any) by unintended recipients is not authorized and may be unlawful. > > -- > 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 > athttp://groups.google.com/group/rubyonrails-talk?hl=en.
-- 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.