Skip to content
Browse files

Allow to pass empty protocol value to canvas url methods

  • Loading branch information...
1 parent ca906d4 commit 89a41fb0c1625441ed3241ad3363345f3535e589 @dekart committed Jun 10, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/facebooker2.rb
View
8 lib/facebooker2.rb
@@ -19,12 +19,12 @@ def self.app_id
@app_id || raise_unconfigured_exception
end
- def self.canvas_page_url(protocol = 'http://')
- "#{protocol}apps.facebook.com/#{canvas_page_name}"
+ def self.canvas_page_url(protocol = nil)
+ "#{ protocol || 'http://' }apps.facebook.com/#{canvas_page_name}"
end
- def self.callback_url(protocol = 'http://')
- @callback_domain ? "#{protocol}#{@callback_domain}" : @callback_url
+ def self.callback_url(protocol = nil)
+ @callback_domain ? "#{ protocol || 'http://' }#{@callback_domain}" : @callback_url
end

0 comments on commit 89a41fb

Please sign in to comment.
Something went wrong with that request. Please try again.