On Tue, Mar 3, 2009 at 1:04 AM, Mark Wilden <m...@mwilden.com> wrote: > On Mon, Mar 2, 2009 at 8:35 PM, Stephen Eley <sfe...@gmail.com> wrote: > >> �...@invoices = Invoice.by_role(user) > > It doesn't seem right to me that invoices know about users and roles. > > I would try something like > user.role.invoices
Heh. Which is what Zach said he wanted to do, and it isn't wrong. But it doesn't seem right to *me* that roles know about invoices. >8-> As I see it, if you go that path you end up having to inform roles about every *other* model, and consolidating all your business logic in one class. At which point you're risking drifting away from object-oriented programming and heading back to big procedures and spaghetti code. But that's a kneejerk response, and it needn't be that bad. It really comes down to taste. To-mae-to, to-mah-to. Sooner or later it's all ones and zeros. -- Have Fun, Steve Eley (sfe...@gmail.com) ESCAPE POD - The Science Fiction Podcast Magazine http://www.escapepod.org _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users