Re: [Rails-core] Commenting out default generated fixtures

2014-11-20 Thread Yves Senn
Yes, please explore possible solutions. Keep in mind that the workflow for scaffolds and possibly other generators that make use of the fixture data should not change. Cheers, — Yves On Wed, Nov 19, 2014 at 11:39 PM, Prathamesh Sonpatki wrote: > Thanks Yves. Thats what happened when I fou

Re: [Rails-core] Commenting out default generated fixtures

2014-11-19 Thread Prathamesh Sonpatki
Thanks Yves. Thats what happened when I found this. I has used model generator and updated the migration manually. I will go through the code and open a PR for model generator commenting out fixtures. Is it okey? Thanks. On Thu, Nov 20, 2014 at 2:32 AM, Yves Senn wrote: > Hey > > The fixtures s

Re: [Rails-core] Commenting out default generated fixtures

2014-11-19 Thread Yves Senn
Hey The fixtures should satisfy not-null constraints if you specify everything through the generator. If you manipulate the migration directly, your fixtures won't be updated accordingly. I got bitten by this in the past. Especially because the model generator does not generate concrete test-c

Re: [Rails-core] Commenting out default generated fixtures

2014-11-16 Thread Prathamesh Sonpatki
Hi Colin, I was suggesting that can we comment them in the generators itself. So that they will be present but commented. Obviously when we want to write tests and use them, we have to go to that file and edit it. We have to do it in any case, whether they are commented or not. Thanks. On Mon, N

Re: [Rails-core] Commenting out default generated fixtures

2014-11-16 Thread Colin Law
On 16 November 2014 14:54, Prathamesh Sonpatki wrote: > Hello all, > > A newly created fixture file by Rails generators contains some fixtures by > default with keys 'one' and 'two'. > If I add any null constraint on some column in that table and try to run > tests then it fails. Because Rails tri

[Rails-core] Commenting out default generated fixtures

2014-11-16 Thread Prathamesh Sonpatki
Hello all, A newly created fixture file by Rails generators contains some fixtures by default with keys 'one' and 'two'. If I add any null constraint on some column in that table and try to run tests then it fails. Because Rails tries to insert records with null values on columns having not-nul