buddy 2.0.3 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,12 +7,8 @@ module Buddy
7
7
  controller.helper_method :request_comes_from_facebook?
8
8
  end
9
9
 
10
- def js_redirect_to(uri, target = nil)
11
- if request_is_facebook_canvas? and !request_is_facebook_tab? and !target.nil?
12
- render(:text => "<script>#{target.to_s}.location.href='#{uri}'</script>", :layout => false)
13
- elsif request_is_facebook_canvas? and !request_is_facebook_tab?
14
- render(:text => "<script>self.location.href='#{uri}'</script>", :layout => false)
15
- end
10
+ def js_redirect_to(uri, target = 'self')
11
+ render(:text => "<script>#{target.to_s}.location.href='#{uri}'</script>", :layout => false) if !request_is_facebook_tab?
16
12
  end
17
13
 
18
14
  def top_redirect_to(uri)
@@ -33,11 +29,11 @@ module Buddy
33
29
  end
34
30
 
35
31
  def request_is_facebook_canvas?
36
- params[:fb][:profile_id].blank?
32
+ params[:fb] && params[:fb][:profile_id].blank?
37
33
  end
38
34
 
39
35
  def request_is_facebook_tab?
40
- !params[:fb][:profile_id].blank?
36
+ params[:fb] && !params[:fb][:profile_id].blank?
41
37
  end
42
38
 
43
39
  def clear_facebook_session_information
data/lib/buddy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Buddy
2
- VERSION = "2.0.3"
2
+ VERSION = "2.0.4"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buddy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 3
10
- version: 2.0.3
9
+ - 4
10
+ version: 2.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ole Riesenberg
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-21 00:00:00 +02:00
18
+ date: 2011-07-22 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies: []
21
21