I am writing an application that keeps track of software licenses. I would like a functionality where if someone is looking at the default page, they can click a ''request'' button next to a program. They are linked to form for entering their name and e-mail address. That is stored in the database along with the id of the program they requested. That part I can do. But I would like to have it so that it then either e-mails the admin or puts up a notice on the admin page that that is requested. I then want it to send an e-mail to the user once another available license is there. Would this be easy to implement? I think I can get the ActiveMailer code for the e-mails, but I don''t know how I would have it recgonize that a license has been added, and that the specific user requested it. Any ideas?
Check out ActiveRecord::Observer Chris Carter wrote:>I am writing an application that keeps track of software licenses. I >would like a functionality where if someone is looking at the default >page, they can click a ''request'' button next to a program. They are >linked to form for entering their name and e-mail address. That is >stored in the database along with the id of the program they >requested. That part I can do. But I would like to have it so that >it then either e-mails the admin or puts up a notice on the admin page >that that is requested. I then want it to send an e-mail to the user >once another available license is there. Would this be easy to >implement? I think I can get the ActiveMailer code for the e-mails, >but I don''t know how I would have it recgonize that a license has been >added, and that the specific user requested it. Any ideas? >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > > > >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
That would tell me when it is updated, but how do I have it figure out if what has been updated is requested? On 7/6/05, Sean T Allen <sean-5W9FBhQXBOtBDgjK7y7TUQ@public.gmane.org> wrote:> Check out ActiveRecord::Observer > > Chris Carter wrote: > > >I am writing an application that keeps track of software licenses. I > >would like a functionality where if someone is looking at the default > >page, they can click a ''request'' button next to a program. They are > >linked to form for entering their name and e-mail address. That is > >stored in the database along with the id of the program they > >requested. That part I can do. But I would like to have it so that > >it then either e-mails the admin or puts up a notice on the admin page > >that that is requested. I then want it to send an e-mail to the user > >once another available license is there. Would this be easy to > >implement? I think I can get the ActiveMailer code for the e-mails, > >but I don''t know how I would have it recgonize that a license has been > >added, and that the specific user requested it. Any ideas? > >_______________________________________________ > >Rails mailing list > >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > >