lib/fauna/model/user.rb in fauna-0.2.2 vs lib/fauna/model/user.rb in fauna-0.2.3
- old
+ new
@@ -1,29 +1,23 @@
module Fauna
class User < Fauna::Model
- class Config < Fauna::Model; end
+ class Config < Fauna::Resource; end
def self.self
find("users/self")
end
def self.find_by_email(email)
find("users/email/#{email}")
end
- def email; struct['email']; end
-
- def password; struct['password']; end
-
def config
Fauna::User::Config.find("#{ref}/config")
end
- private
-
- def post
- Fauna::Client.post("users", struct)
- end
+ # set on user create
+ def email; struct['email']; end
+ def password; struct['password']; end
end
end