user und fetprofile link

This commit is contained in:
Andreas Stephanides
2013-12-16 10:27:15 +01:00
parent e57a3290cf
commit 56f32606dc
5 changed files with 60 additions and 28 deletions

View File

@@ -33,6 +33,7 @@ class User < ActiveRecord::Base
# Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation, :remember_me, :provider, :uid, :name
belongs_to :fetprofile
# attr_accessible :title, :body
def self.find_for_facebook_oauth(auth, signed_in_resource=nil)
logger.debug auth.to_s
@@ -79,5 +80,11 @@ logger.debug auth.to_s
end
end
end
def text
if self.fetprofile.nil?
self.email
else
self.fetprofile.name
end
end
end