[rspec-users] Design Pattern proposal for better Rails development

Ashley Moran ashley.moran at patchspace.co.uk
Wed Nov 5 09:11:13 EST 2008


On 5 Nov 2008, at 13:17, Fernando Perez wrote:

> Let's say I have a class method: Product.find_if_purchased(product_id,
> user_id)
>
> Let's say it is called in 3 different controllers.

Hmmm, could you make a helper module and mix that into all three  
controllers?  Then there'd be just one place to change it.

Ashley

-- 
http://www.patchspace.co.uk/
http://aviewfromafar.net/





More information about the rspec-users mailing list