On Oct 26, 11:59 am, Alpha Blue <[email protected]>
wrote:
> This is pretty funny.
>
> Just by typing out the issue, I just found my problem.
>
> When uploading to the database I was doing:
>
>  win_loss = myvars[i].scan(/\w\s\d{1,2}-\d{1,2}/)
>
> Instead of ..
>
>  win_loss = "#{myvars[i].scan(/\w\s\d{1,2}-\d{1,2}/)}"

You can also do:

myvars[i].scan(/\w\s\d{1,2}-\d{1,2}/).to_s

It will do the right thing when no match is found, etc.

-- W

> I realized this when I saw the empty [] array listed in the database.
>
> Problem fixed.  My apologies...


--~--~---------~--~----~------------~-------~--~----~
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