ajax 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/README.rdoc +1 -0
- data/VERSION +1 -1
- data/lib/ajax/action_controller.rb +2 -2
- 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.3: Guard against possible nil values for the redirect_to url and the referrers
|
13
14
|
* v1.1.2: Fix Rails 3 render hook so it doesn't break rendering with no layout e.g. <tt>render :json => ...</tt>
|
14
15
|
* v1.1.1: Backwards compatibility fix for Rails < 3
|
15
16
|
* v1.1.0: Rails 3 supported!
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.3
|
@@ -156,13 +156,13 @@ module Ajax
|
|
156
156
|
# Return true if an Ajax "redirect" was performed, and false
|
157
157
|
# otherwise.
|
158
158
|
def _ajax_redirect(url, status)
|
159
|
-
return false
|
159
|
+
return false if url.nil? || !Ajax.is_enabled?
|
160
160
|
special_redirect = false
|
161
161
|
original_url = url
|
162
162
|
|
163
163
|
# If we have the full referrer in Ajax-Info, use that because it
|
164
164
|
# includes the fragment.
|
165
|
-
if url == request.headers["Referer"] && !request.headers['Ajax-Info'].blank?
|
165
|
+
if url == request.headers["Referer"] && !request.headers['Ajax-Info'].blank? && !request.headers['Ajax-Info']['referer'].blank?
|
166
166
|
url = request.headers['Ajax-Info']['referer']
|
167
167
|
Ajax.logger.debug("[ajax] using referer #{url} from Ajax-Info")
|
168
168
|
end
|
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: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 3
|
10
|
+
version: 1.1.3
|
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-05-
|
18
|
+
date: 2011-05-05 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|