Re: MVC best practice advice needed

2009-04-13 Thread mattalexx
Well, there is other stuff that happens when a user is deactivated. They are sent an e-mail for example... On Mar 23, 9:02 am, oliver.pra...@googlemail.com oliver.pra...@googlemail.com wrote: I dont get why you even have that process of marking them (or how you Mark them). Just add a function

Re: MVC best practice advice needed

2009-03-23 Thread aman batra
I think it is a good practice to have a function in User model that should serve the required purpose than any other approach. On Mar 22, 2:22 pm, mattalexx mattal...@gmail.com wrote: Thank you. On Mar 21, 11:51 pm, mscdex msc...@gmail.com wrote: Sorry, I half-misread your situation. In

Re: MVC best practice advice needed

2009-03-23 Thread oliver.pra...@googlemail.com
I dont get why you even have that process of marking them (or how you Mark them). Just add a function that checks expiration and put it in the beforeFilter ... On Mar 23, 8:20 am, aman batra batra_aman2...@yahoo.com wrote: I think it is a good practice to have a function in User model that

Re: MVC best practice advice needed

2009-03-22 Thread mattalexx
Thank you. On Mar 21, 11:51 pm, mscdex msc...@gmail.com wrote: Sorry, I half-misread your situation. In my opinion, I would probably add a deactivateExpired function in the User model that would do the necessary checking and saving. --~--~-~--~~~---~--~~ You

MVC best practice advice needed

2009-03-21 Thread mattalexx
I have a table full of users. Each record has an expiration datetime field. I have a shell script that checks to see if there are users who's accounts have expired and deactivate them. So here's the process: 1. Get all users who's accounts have expired but are still marked active. 2. Mark them

Re: MVC best practice advice needed

2009-03-21 Thread mscdex
On Mar 22, 12:57 am, mattalexx mattal...@gmail.com wrote: It's really pretty simple. My question is, is it good practice to have a model method handle the whole thing or should I just use the model to retrieve the records and to save them. My approach would be to have a method in the User

Re: MVC best practice advice needed

2009-03-21 Thread mscdex
Sorry, I half-misread your situation. In my opinion, I would probably add a deactivateExpired function in the User model that would do the necessary checking and saving. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups