What is the best way to add enable/disable users to my application
with Devise?
Thanks
If you want to tell Devise to not allow inactive users to sign in, you
can override the :find_for_authentication class method Devise
provides:
def self.find_for_authentication(conditions={})
conditions[:active] = true
find(:first, :conditions => conditions)
end
I need similar functionality very often, so may be after deep review
Device code I will add some submodule for simple reuse in the future.
Big thanks for help and for the quick replay.
On Jan 26, 3:10 pm, anahoret <slava.doda...@gmail.com> wrote:
> Actually I have similar implementation after readinghttp://groups.google.com/group/plataformatec-devise/browse_thread/thr...