diff options
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index f8b9ddc..6bc5841 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -42,6 +42,10 @@ class User < CouchRest::Model::Base view :by_created_at end # end of design + def self.login_starts_with(query) + self.by_login.startkey(query).endkey(query + "\ufff0") + end + def reload @identity = nil super |