I was agreeing! I wasn't saying that what you were saying there wasn't expressing the intent in the model, I was saying that my long ramble was saying the same thing roughly, and that this differs from the standard approach in rails of using ActiveRecord:Base class methods directly.
Apologies for not making that clear - I find email such a challenging form of communication at times :) Andrew 2008/12/12 Pat Maddox <perg...@gmail.com> > "Andrew Premdas" <aprem...@gmail.com> writes: > > 2008/12/11 Pat Maddox <perg...@gmail.com> writes > >> The clearest way to represent these contextual differences, in my > >> experience, is to create an intention-revealing method and use that. > > > > The point I'm making is that this intention should be expressed > > clearly in the model, whereas currently its expressed in the > > controller. > > What? No. I said create methods with intention-revealing names. That > means stuff like Post.since or Account.audited or > Product.non_refillable. That absolutely is expressing the intent in the > model, and calling it from the controller, which is what you want. > > Pat > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users