ninsho 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ninsho/authentication.rb +1 -0
- data/lib/ninsho/version.rb +1 -1
- metadata +1 -1
@@ -32,6 +32,7 @@ module Ninsho
|
|
32
32
|
def from_user
|
33
33
|
attrs = { email: @email }
|
34
34
|
user = Ninsho.parent_resource_name.where(attrs).first_or_initialize
|
35
|
+
user = Ninsho.parent_resource_name.new if @provider == "twitter"
|
35
36
|
user.attributes = holding_attributes(attrs) if user.new_record?
|
36
37
|
user.send("#{Ninsho.resource_name.pluralize}").build(provider: @provider, uid: @uid, oauth_token: @oauth_token)
|
37
38
|
user.save
|
data/lib/ninsho/version.rb
CHANGED