Commit 7da907b44821fcc1a269138de8d2d0a768a4940e

Authored by Artur Faria
1 parent 1f2b11e4

Link to setting and perfil when an user is logged with facebook

Signed-off-by: Artur Bersan de Faria <artur_bersan@hotmail.com>
Signed-off-by: Matheus Miranda <matheusmirandalacerda@gmail.com>
plugins/oauth_client/lib/ext/external_person.rb
... ... @@ -15,15 +15,16 @@ class ExternalPerson
15 15  
16 16 # This method is un alias to 'url' method of ExternalPerson < ActiveRecord::Base
17 17 def public_profile_url
18   - self.oauth_auth.string_url
  18 + self.oauth_auth.perfil_url
19 19 end
20 20  
  21 +
21 22 def url
22   - self.oauth_auth.string_url
  23 + self.oauth_auth.perfil_url
23 24 end
24 25  
25 26 def admin_url
26   - self.oauth_auth.string_url
  27 + self.oauth_auth.setting_url
27 28 end
28 29  
29 30 class ExternalPerson::Image
... ...
plugins/oauth_client/models/oauth_client_plugin/facebook_auth.rb
... ... @@ -13,8 +13,12 @@ class OauthClientPlugin::FacebookAuth &lt; OauthClientPlugin::Auth
13 13 "http://graph.facebook.com/#{self.uid}/picture"
14 14 end
15 15  
16   - def string_url
17   - "https://www.facebook.com/"
  16 + def perfil_url
  17 + "https://www.facebook.com/#{self.uid}"
  18 + end
  19 +
  20 + def setting_url
  21 + "https://www.facebook.com/settings"
18 22 end
19 23  
20 24 end
... ...