Rails List
2009-Feb-16 12:11 UTC
How to set roles during user creation (role_requirement+rest
I am using role_requirement + restful_authentication for my project. Role based authorization works fine as long as data is present in roles_users table for users and roles. I would like to insert data into this table when some one sign up as a new user. How do I insert a record in this table as soon as someone signs up or someone activates their account?. Are there any methods like (has_role ''registered'') that inserts the data into that table?. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ramon Tayag
2009-Feb-16 12:28 UTC
Re: How to set roles during user creation (role_requirement+rest
You can do an after_create in the user that has_role ''registered'' Ramon Tayag On Mon, Feb 16, 2009 at 8:11 PM, Rails List <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I am using role_requirement + restful_authentication for my project. > Role based authorization works fine as long as data is present in > roles_users table for users and roles. I would like to insert data into > this table when some one sign up as a new user. How do I insert a record > in this table as soon as someone signs up or someone activates their > account?. > > Are there any methods like (has_role ''registered'') that inserts the data > into that table?. > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Rails List
2009-Feb-16 16:31 UTC
Re: How to set roles during user creation (role_requirement
Ramon Tayag wrote:> You can do an after_create in the user that has_role ''registered'' > > Ramon Tayag > > > > On Mon, Feb 16, 2009 at 8:11 PM, Rails ListHi Ramon Can I have a bit more detailed instruction. i am a newbie, hence i find it difficult. Thanks in advance -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---