Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

get all fb logins or twitter loggins

  • Loading branch information...
commit 8e1a04e6ecfdbf8c8ff344a8bd3c26158f0bbeb6 1 parent 69ba0fd
@mooktakim authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 app/models/omnisocial/user.rb
View
8 app/models/omnisocial/user.rb
@@ -44,6 +44,10 @@ def has_twitter?
def twitter_login
@twitter_login ||= login_accounts.detect{|l| l.kind_of? Omnisocial::TwitterAccount }
end
+
+ def twitter_logins
+ @twitter_logins ||= login_accounts.select{|l| l.kind_of? Omnisocial::TwitterAccount }
+ end
def has_facebook?
!!facebook_login
@@ -52,6 +56,10 @@ def has_facebook?
def facebook_login
@facebook_login ||= login_accounts.detect{|l| l.kind_of? Omnisocial::FacebookAccount }
end
+
+ def facebook_logins
+ @facebook_logins ||= login_accounts.select{|l| l.kind_of? Omnisocial::FacebookAccount }
+ end
def to_param
if !self.login.include?('profile.php?')
Please sign in to comment.
Something went wrong with that request. Please try again.