this is my first post here. I have several Rails books here that I’m
working and I’m trying to “get the light bulb to turn on.”
I’m attempting a small application that processes account
applications, and if approved, turns them into clients. I’ve got
account_application and client models. I have the a_a side working
reasonably well. I have a list of pending applications, I can review
them individually, and approve or decline them.
Upon approval what I want to do is conceptually simple, but I just
can’t figure out where it “belongs.” When I have an approved
application I’d like to create a client based on that application.
The client will get an an account number and such, and also retain a
“has one” relationship with the application.
Where do I make that happen? In the client model? The client controller?
Also, can I create an account application with a “belongs to” before
I have a client to which it can belong?
I think my biggest hurdle is that I don’t yet grasp how the Rails
“magic” works, and so I don’t know how to fit it in.
Thanks for any guidance,