Forum: Ruby on Rails How to set roles during user creation (role_requirement+rest

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F04a22457fcbfee2afc77e77482abe08?d=identicon&s=25 Rails List (railslist)
on 2009-02-16 13:11
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?.
Fbd9cb107fe7c941333d6a3488691989?d=identicon&s=25 Ramon Tayag (ramontayag)
on 2009-02-16 13:29
(Received via mailing list)
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
F04a22457fcbfee2afc77e77482abe08?d=identicon&s=25 Rails List (railslist)
on 2009-02-16 17:31
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 List

Hi Ramon

Can I have a bit more detailed instruction.  i am  a newbie, hence i
find it difficult. Thanks in advance
This topic is locked and can not be replied to.