Hi Tim can I assign a default (lowest level) role (member) automatically when the user leaves the page?
i was thinking maybe with the use of current_page check that the page has changed and then assign a default role automatically what do you think? Ami On Oct 21, 10:34 am, "Tim P." <[EMAIL PROTECTED]> wrote: > You can't force someone to do something before leaving a page since > there's always the back button, typing in a URL, etc. An after_filter > won't be very useful but what about a before_filter? > > With a before_filter you can check if there are any ghost users and > redirect to the user role page to force them to choose a role for the > ghost user. So, if they leave the role page after removing a role, they > will be taken back to it until they choose a role. > > Will that work? > > If you have multiple admins you could store in the session the user that > had a role removed and by which logged in admin to prevent it from > redirecting admin A to set a role when it was admin B that removed the > role. > -- > Posted viahttp://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 [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 -~----------~----~----~----~------~----~------~--~---

