thoughtbot/factory_girl — pull request #442 by HugoLnx (2012-09-30 04:14:21+00:00)
Title: Autogenerate with simple sequences

Hello fellas!

I think that simple sequences should be easy to made, so I created the autogenerate (I accept new names suggestions)

The idea is easily create a sequence that will use an string and put a number incrementing.

The autogenerate method can be used in two ways:

Passing a string with #N auto generate will put the sequential number replacing #N, like:
```
autogenerate("nickname#N@email.com") # "nickname1@email.com"
autogenerate("nickname#N@email.com") # "nickname2@email.com"
autogenerate("nickname#N@email.com") # "nickname3@email.com"
```

Or passing a string without #N, that will be the same of passing #N in the end:

```
autogenerate("myname") # "myname1"
autogenerate("myname") # "myname2"
autogenerate("myname") # "myname3"
```

I think this will made simple sequences of factory_girl pretty much happy ;D

what do you guys think about it?

thanks for attention, see ya!