It''s not entirely clear to my what you want to do. But if I understand
correctly, you should try this:
@army_types.each do |st|
@user.send(st)
end
On 5/8/06, Mohammad <name.goes.here44@gmail.com>
wrote:> Hi all,
> I made this array:
> @army_types =
["ss","s","xl","l","m","w","xw"]
> but, I want to be able to go like this
> @army_types.each do |st|
> @user.st
> end
> but, I get the error that "@user.st" st is not a valid feild for
the
> table user.
> Is there a way to get around MySQL running it first?
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>