machinist icon indicating copy to clipboard operation
machinist copied to clipboard

More of a feature request: switchable associations

Open wulftone opened this issue 14 years ago • 3 comments

I've found myself frequently creating two blueprints for a single model, one with associations, one without. It would be great if there was a simple switch to turn off/on the creation of related records...

wulftone avatar Oct 05 '11 23:10 wulftone

+1 for this. Is this project even still active though?

scottkf avatar Dec 08 '11 16:12 scottkf

I didn't test, but according to wiki this is possible by passing nil for the association.

@scottkf I'm wondering too if project is still active, very sad if it wouldn't :-( - @notahat ?

rngtng avatar Dec 18 '11 18:12 rngtng

True, but I was thinking of a more succinct way, like User.make!(:no_relations) or something (which is what I currently do, but I have to explicitly type out a new blueprint for this). Some models have lots of associations, so it'd start to be a pain to have to turn all of them off. I might add this functionality myself once my current project is over.

wulftone avatar Dec 18 '11 19:12 wulftone