sqlite3, test coverage improvements, auto auth
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
class Authentication < ActiveRecord::Base
|
||||
belongs_to :user
|
||||
belongs_to :person
|
||||
validates :uid, presence: true, uniqueness: { scope: :provider }
|
||||
end
|
||||
|
@ -11,7 +11,7 @@ class Person < ActiveRecord::Base
|
||||
validates :phone, presence: true
|
||||
|
||||
scope :with_name, lambda { |name|
|
||||
where("concat(first_name, ' ', last_name) RLIKE ?", name)
|
||||
where("first_name || ' ' || last_name LIKE ?", "%#{name}%")
|
||||
}
|
||||
|
||||
scope :just_parents, lambda {
|
||||
@ -34,6 +34,10 @@ class Person < ActiveRecord::Base
|
||||
id
|
||||
end
|
||||
|
||||
def active?
|
||||
activation_state == "active"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
## SorceryCore expects the model to hold a crypted_password field
|
||||
|
Reference in New Issue
Block a user