Commit 1f2b11e4c2be168c45a8c89a3cf67f3b185134d0

Authored by Artur Faria
1 parent 25339596

Overwrite method to url of menu

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
... ... @@ -13,6 +13,19 @@ class ExternalPerson
13 13 ExternalPerson::Image.new(oauth_auth)
14 14 end
15 15  
  16 + # This method is un alias to 'url' method of ExternalPerson < ActiveRecord::Base
  17 + def public_profile_url
  18 + self.oauth_auth.string_url
  19 + end
  20 +
  21 + def url
  22 + self.oauth_auth.string_url
  23 + end
  24 +
  25 + def admin_url
  26 + self.oauth_auth.string_url
  27 + end
  28 +
16 29 class ExternalPerson::Image
17 30 def initialize(oauth_auth)
18 31 @oauth_auth = oauth_auth
... ...
plugins/oauth_client/models/oauth_client_plugin/facebook_auth.rb
1 1 class OauthClientPlugin::FacebookAuth < OauthClientPlugin::Auth
2 2  
3   - IMAGE_SIZES = {
  3 + IMAGE_SIZES = {
4 4 :big => "150",
5 5 :thumb => "100",
6 6 :portrait => "64",
... ... @@ -13,4 +13,8 @@ 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/"
  18 + end
  19 +
16 20 end
... ...