user activation on creation/edit

This commit is contained in:
2015-10-23 19:57:32 -05:00
parent 7ddf93578e
commit 0d597813ec
5 changed files with 28 additions and 6 deletions

View File

@ -38,6 +38,18 @@ class Person < ActiveRecord::Base
activation_state == "active"
end
def active
activation_state == 'active'
end
def active=(bool)
if bool
self.activation_state = 'active'
else
self.ctivation_state = nil
end
end
private
## SorceryCore expects the model to hold a crypted_password field