On 28 June 2012 08:35, Tushar Gandhi <[email protected]> wrote:
> Hi,
> I have a problem with blocking user as follows:-
>
> We have a Admin Panel from where Admin can block the user which is
> working fine.
> Suppose the user "[email protected]" is login and he is doing spam on our
> site. Then Admin has decided to block that user. Admin blocks that user
> but the user hasn't logged out yet due to that he still can do Spam the
> site.
>
> How can I fix this? I do not want to add any filter for each request.

Why don't you want to do the test in a filter?  Presumably you are
already running a before_filter to check that the user is logged in,
just put the check in there.  The overheads will be trivial.  If you
are seriously worried about the overheads then just do the test on
actions that matter, such as sending the spam.

Colin

-- 
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-US.

Reply via email to