Hi i have a page (assign role to user) in which i can add or remove a role.
i have a people model that is tied to the user model with has one role , changing the role changes the person type thus, if you remove a role you can assign one of the 5 roles (admin, manager, instructor, staff, member) here's where i want to make sure that the user( typically an Admin) assign any role for the selected user and wont leave this user without a role. if an Admin forget to assign a role the person (user / member or whatever) become a ghost. how can i make sure the user assign a role BEFORE they can navigate away from the page. i can easily check if user.roles.empty? then flash error and render / redirect but i tried after_filter on the controller which doesnt seem to be doing anything. thanks Ami --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

