ajaxify_rails 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -66,8 +66,9 @@ ajaxify = ->
|
|
66
66
|
|
67
67
|
|
68
68
|
# (history interface browsers only)
|
69
|
-
window.
|
70
|
-
|
69
|
+
$(window).on 'popstate', (e) ->
|
70
|
+
e = e.originalEvent
|
71
|
+
if e.state and e.state.data and e.state.data.ajaxified
|
71
72
|
e.state.cache = false
|
72
73
|
load e.state, true
|
73
74
|
|
@@ -195,6 +196,8 @@ update_url = (options, pop_state = false) ->
|
|
195
196
|
window.history.replaceState initial_history_state, ''
|
196
197
|
initial_history_state = ''
|
197
198
|
|
199
|
+
options.data ||= {}
|
200
|
+
options.data.ajaxified = true
|
198
201
|
window.history.pushState
|
199
202
|
url: options.url
|
200
203
|
data: options.data
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ajaxify_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -66,7 +66,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
66
66
|
version: '0'
|
67
67
|
segments:
|
68
68
|
- 0
|
69
|
-
hash:
|
69
|
+
hash: 4265493633309199773
|
70
70
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
71
|
none: false
|
72
72
|
requirements:
|
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
75
|
version: '0'
|
76
76
|
segments:
|
77
77
|
- 0
|
78
|
-
hash:
|
78
|
+
hash: 4265493633309199773
|
79
79
|
requirements: []
|
80
80
|
rubyforge_project:
|
81
81
|
rubygems_version: 1.8.24
|