On Sat, Dec 18, 2010 at 2:21 PM, daze <[email protected]> wrote:

> On Dec 18, 4:51 am, Marnen Laibow-Koser <[email protected]> wrote:
> > Why are you using the same sequence in two different factories?
>
> I just want a way to number things differently for multiple
> factories.  I originally had a sequence called :article_title, but
> then I didn't want to make something SO similar later
> with :page_title, and I all I really need is number that increments...
>
> > OK.  Got it.  Now what's the question?
>
> I get an error in the factory for :page, but not an error
> for :article, regarding the sequence :count.
>
> This suggests that I can't call "Factory.next(:count)" in different
> factories.
>
> Is this the case?  Or is there something wrong with my methodology?
>

Do you have your :count sequence defined in factories/factories.rb? I have a
similar case defined in this file and it works fine:







>
> --
> 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]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://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 [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