facebooker2 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/facebooker2.rb
CHANGED
@@ -17,10 +17,15 @@ module Facebooker2
|
|
17
17
|
# => <fb:login-button onlogin="window.location.href = "/other_page";" v="2">Login with Facebook</fb:login-button>
|
18
18
|
#
|
19
19
|
def fb_login_and_redirect(url, options = {})
|
20
|
-
|
21
|
-
|
20
|
+
# Check if we got the update_page method (pre-Rails 3.1)
|
21
|
+
if respond_to? 'update_page'
|
22
|
+
js = update_page do |page|
|
23
|
+
page.redirect_to url
|
24
|
+
end
|
25
|
+
# Else use plain js
|
26
|
+
else
|
27
|
+
js = "window.location.href = '#{url}'"
|
22
28
|
end
|
23
|
-
|
24
29
|
text = options.delete(:text)
|
25
30
|
|
26
31
|
#rails 3 only escapes non-html_safe strings, so get the raw string instead of the SafeBuffer
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: facebooker2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 5
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 13
|
10
|
+
version: 0.0.13
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mike Mangino
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-09-30 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -26,12 +26,12 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
29
|
+
hash: 93
|
30
30
|
segments:
|
31
31
|
- 0
|
32
32
|
- 0
|
33
|
-
-
|
34
|
-
version: 0.0.
|
33
|
+
- 33
|
34
|
+
version: 0.0.33
|
35
35
|
type: :runtime
|
36
36
|
version_requirements: *id001
|
37
37
|
- !ruby/object:Gem::Dependency
|