Commit 7da907b44821fcc1a269138de8d2d0a768a4940e
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>
Showing
2 changed files
with
10 additions
and
5 deletions
Show diff stats
plugins/oauth_client/lib/ext/external_person.rb
@@ -15,15 +15,16 @@ class ExternalPerson | @@ -15,15 +15,16 @@ class ExternalPerson | ||
15 | 15 | ||
16 | # This method is un alias to 'url' method of ExternalPerson < ActiveRecord::Base | 16 | # This method is un alias to 'url' method of ExternalPerson < ActiveRecord::Base |
17 | def public_profile_url | 17 | def public_profile_url |
18 | - self.oauth_auth.string_url | 18 | + self.oauth_auth.perfil_url |
19 | end | 19 | end |
20 | 20 | ||
21 | + | ||
21 | def url | 22 | def url |
22 | - self.oauth_auth.string_url | 23 | + self.oauth_auth.perfil_url |
23 | end | 24 | end |
24 | 25 | ||
25 | def admin_url | 26 | def admin_url |
26 | - self.oauth_auth.string_url | 27 | + self.oauth_auth.setting_url |
27 | end | 28 | end |
28 | 29 | ||
29 | class ExternalPerson::Image | 30 | class ExternalPerson::Image |
plugins/oauth_client/models/oauth_client_plugin/facebook_auth.rb
@@ -13,8 +13,12 @@ class OauthClientPlugin::FacebookAuth < OauthClientPlugin::Auth | @@ -13,8 +13,12 @@ class OauthClientPlugin::FacebookAuth < OauthClientPlugin::Auth | ||
13 | "http://graph.facebook.com/#{self.uid}/picture" | 13 | "http://graph.facebook.com/#{self.uid}/picture" |
14 | end | 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 | end | 22 | end |
19 | 23 | ||
20 | end | 24 | end |