ajax 1.1.1 → 1.1.2
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/Gemfile.lock +1 -1
- data/README.rdoc +1 -0
- data/VERSION +1 -1
- data/lib/ajax/action_controller.rb +12 -15
- metadata +4 -4
data/Gemfile.lock
CHANGED
data/README.rdoc
CHANGED
@@ -10,6 +10,7 @@ As of May 2010 Ajax is being used live in production on kazaa.com[http://www.kaz
|
|
10
10
|
|
11
11
|
== Changelog
|
12
12
|
|
13
|
+
* v1.1.2: Fix Rails 3 render hook so it doesn't break rendering with no layout e.g. <tt>render :json => ...</tt>
|
13
14
|
* v1.1.1: Backwards compatibility fix for Rails < 3
|
14
15
|
* v1.1.0: Rails 3 supported!
|
15
16
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.2
|
@@ -125,22 +125,19 @@ module Ajax
|
|
125
125
|
end
|
126
126
|
end
|
127
127
|
|
128
|
-
#
|
129
|
-
#
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
128
|
+
# Specialize the default layout finder. Try to use a layout in layouts/ajax
|
129
|
+
# as the default layout, if one exists.
|
130
|
+
def _default_layout(require_layout = false)
|
131
|
+
if require_layout || !request.xhr? || !Ajax.is_enabled?
|
132
|
+
super
|
133
|
+
else
|
134
|
+
layout_name = super
|
135
|
+
if ajax_layout = _layout_for_ajax(layout_name)
|
136
|
+
ajax_layout.virtual_path
|
137
|
+
else
|
138
|
+
layout_name
|
139
|
+
end
|
137
140
|
end
|
138
|
-
|
139
|
-
# Send the current layout and controller in a custom response header
|
140
|
-
Ajax.set_header(response, :layout, options[:layout])
|
141
|
-
Ajax.set_header(response, :controller, self.class.controller_name)
|
142
|
-
|
143
|
-
_render_template(options)
|
144
141
|
end
|
145
142
|
end
|
146
143
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ajax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 2
|
10
|
+
version: 1.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Karl Varga
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-05-03 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|