On 14 May 2010 19:24, Viorel 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 t
What exactly are you trying to do with this?
On Fri, May 14, 2010 at 2:24 PM, Viorel 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 fiel
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, b
3 matches
Mail list logo