On Thu, 24 Mar 2005 18:31:31 -0800, Francisco Hernandez
<lagcisco-b7MHZcQsHeJWk0Htik3J/w@public.gmane.org>
wrote:> say I have a signup form, that registers an Account, the form asks for
> your typical signup infomation but also some other information such as a
> Referring Account (must already exist) and with this signup process we
> would also have to create a few other domain/model objects.. so my
> question is
>
> where should the bulk of this logic go? controller? helper? something else?
>
> I''ve done this before in Java but I had a Service that did the
work
> using several Daos, we''ve also used this same service easily with
> xml-rpc and in scheduled jobs (that run every day)
>
> Additionally we would have to wrap everything into one transaction
> (automatically done for us using Spring), is there a way to specify if a
> method should be wrapped into a transaction?
I''d do it in the controller. If you find yourself doing the same type
of stuff often in controllers, move it to helpers/application.rb.