Where to put the transaction?

Hi, I'm rewriting some really old code these days and I'm trying to
adhere to the "fat model, skinny controller" approach.

I'm wondering how much to actually stuff into the model, and if
there's some rule of thumb. For example, I could do this in a

def controller_action
  MyModel.transaction do

Or, I could put it all on the model instance:

def do_stuff
  MyModel.transaction do

Any tips on what's preferable and when/why?



This is just a "me too" ... I am just now comfortable enough with
rails to be able to accomplish a task both of those ways, and I have a
tough time figuring out when I should choose on or the other. The
Railscasts from http://railscasts.com/ are quite helpful, that's how I
have been figuring it out.