responds_to_parent 1.0.20091013 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/responds_to_parent/action_controller.rb +6 -5
- metadata +25 -33
@@ -9,18 +9,19 @@ module RespondsToParent
|
|
9
9
|
|
10
10
|
if performed?
|
11
11
|
# Either pull out a redirect or the request body
|
12
|
-
script = if
|
12
|
+
script = if response.headers['Location']
|
13
|
+
#TODO: erase_redirect_results is missing in rails 3.0
|
13
14
|
"document.location.href = '#{self.class.helpers.escape_javascript location.to_s}'"
|
14
15
|
else
|
15
16
|
response.body || ''
|
16
17
|
end
|
17
18
|
|
18
|
-
# Clear out the previous render to prevent double render
|
19
|
-
erase_results
|
20
|
-
|
21
19
|
# We're returning HTML instead of JS or XML now
|
22
20
|
response.headers['Content-Type'] = 'text/html; charset=UTF-8'
|
23
21
|
|
22
|
+
# Clear out the previous render to prevent double render
|
23
|
+
response.request.env['action_controller.instance'].instance_variable_set(:@_response_body, nil)
|
24
|
+
|
24
25
|
# Eval in parent scope and replace document location of this frame
|
25
26
|
# so back button doesn't replay action on targeted forms
|
26
27
|
# loc = document.location to be set after parent is updated for IE
|
@@ -35,4 +36,4 @@ module RespondsToParent
|
|
35
36
|
end
|
36
37
|
alias respond_to_parent responds_to_parent
|
37
38
|
end
|
38
|
-
end
|
39
|
+
end
|
metadata
CHANGED
@@ -1,27 +1,22 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: responds_to_parent
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.0
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
|
-
authors:
|
7
|
-
|
7
|
+
authors:
|
8
|
+
- Mark Catley
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
|
12
|
-
date: 2010-01-20 00:00:00 +13:00
|
13
|
-
default_executable:
|
12
|
+
date: 2012-05-09 00:00:00.000000000 Z
|
14
13
|
dependencies: []
|
15
|
-
|
16
14
|
description:
|
17
15
|
email:
|
18
16
|
executables: []
|
19
|
-
|
20
17
|
extensions: []
|
21
|
-
|
22
18
|
extra_rdoc_files: []
|
23
|
-
|
24
|
-
files:
|
19
|
+
files:
|
25
20
|
- README
|
26
21
|
- Rakefile
|
27
22
|
- MIT-LICENSE
|
@@ -30,33 +25,30 @@ files:
|
|
30
25
|
- lib/responds_to_parent/selector_assertion.rb
|
31
26
|
- test/responds_to_parent_test.rb
|
32
27
|
- test/assert_select_parent_test.rb
|
33
|
-
has_rdoc: true
|
34
28
|
homepage: http://github.com/markcatley/responds_to_parent
|
35
29
|
licenses: []
|
36
|
-
|
37
30
|
post_install_message:
|
38
31
|
rdoc_options: []
|
39
|
-
|
40
|
-
require_paths:
|
32
|
+
require_paths:
|
41
33
|
- lib
|
42
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
34
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
36
|
+
requirements:
|
37
|
+
- - ! '>='
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
54
46
|
requirements: []
|
55
|
-
|
56
47
|
rubyforge_project:
|
57
|
-
rubygems_version: 1.
|
48
|
+
rubygems_version: 1.8.24
|
58
49
|
signing_key:
|
59
50
|
specification_version: 3
|
60
|
-
summary:
|
51
|
+
summary: ! '[Rails] Adds ''responds_to_parent'' to your controller torespond to the
|
52
|
+
parent document of your page.Make Ajaxy file uploads by posting the form to a hiddeniframe,
|
53
|
+
and respond with RJS to the parent window.'
|
61
54
|
test_files: []
|
62
|
-
|