|
| From: | Jiten Bhagat |
| Subject: | Re: [Myexperiment-discuss] Real live user - when? |
| Date: | Fri, 20 Feb 2009 12:16:26 +0000 |
| User-agent: | Thunderbird 2.0.0.19 (Windows/20081209) |
Hi Tony,The 'confirm_email' action in the users_controller is where a user's account gets activated if it's the first time they are confiming an email (this action is reused whenever updated email addresses need to be confirmed).
However, the best solution for your requirement might be to1. create a user.rb file in your /lib/ folder with a class definition for User that will extend the existing User model (ie: class User < ActiveRecord::Base). 2. in this user.rb file, define an after_save callback that checks to see if the user has been activated and then create the endpoint if required. 3. in your environment_private.rb file call the User class once to ensure that it gets loaded. (You might need to do a "require 'user'" first). You can load up the class just by writing "User". This will load up your customisations into the existing User class already loaded up in the Rails app.
Let me know if you need any more help with this. Cheers, Jits Linde, A.E. wrote:
Yes, me again, I’m afraid.Where (in users_controller.rb I guess) does a user finally have a real workable account? I ask because when they’ve got it, I want to create their triplestore.Also, if I want to create a routine to construct and return the triplestore endpoint for a user, where would I put it?(apologies: I’ve not been able to get into ruby/rails as I’d have liked) Thanks, Tony. -- Tony Linde Project Manager Department of Physics & Astronomy University of Leicester ------------------------------------------------------------------------ _______________________________________________ Myexperiment-discuss mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/myexperiment-discuss
| [Prev in Thread] | Current Thread | [Next in Thread] |