@@ -90,7 +90,7 @@ def failure_test
90
90
91
91
Rails . application . routes . append do
92
92
post '/success_action_test' , to : 'action_test#success_test' , as : 'success_action_test' unless path_exists? ( :success_action_test_path )
93
- post '/failure_action_test' , to : 'action_test#failure_test' , as : 'failure_action_test' unless path_exists? ( :failure_action_test_path )
93
+ post '/failure_action_test' , to : 'action_test#failure_test' , as : 'failure_action_action_test' # unless path_exists?(:failure_action_test_path)
94
94
end
95
95
Rails . application . reload_routes!
96
96
end
@@ -101,7 +101,7 @@ def response
101
101
action action_config do
102
102
button text : "Click me!"
103
103
end
104
- async rerender_on : "my_action_success" do
104
+ async rerender_on : "my_action_success" , id : 'async-page' do
105
105
div id : "my-div" do
106
106
plain "#{ DateTime . now . strftime ( '%Q' ) } "
107
107
end
@@ -135,7 +135,7 @@ def response
135
135
action action_config do
136
136
button text : "Click me!"
137
137
end
138
- async show_on : "my_action_success" , hide_after : 300 do
138
+ async show_on : "my_action_success" , hide_after : 300 , id : 'async-page' do
139
139
plain "{{event.data.message}}"
140
140
end
141
141
end
@@ -165,18 +165,18 @@ def response
165
165
action action_config do
166
166
button text : "Click me!"
167
167
end
168
- async show_on : "my_action_success" , hide_after : 300 do
168
+ async show_on : "my_action_success" , hide_after : 300 , id : 'async-page-1' do
169
169
plain "{{event.data.message}}"
170
170
end
171
- async show_on : "my_action_failure" , hide_after : 300 do
171
+ async show_on : "my_action_failure" , hide_after : 300 , id : 'async-page-2' do
172
172
plain "{{event.data.message}}"
173
173
end
174
174
end
175
175
176
176
def action_config
177
177
return {
178
178
method : :post ,
179
- path : :failure_action_test_path ,
179
+ path : :failure_action_action_test_path ,
180
180
success : {
181
181
emit : "my_action_success"
182
182
} ,
@@ -205,10 +205,10 @@ def response
205
205
main do
206
206
page_content
207
207
end
208
- async show_on : "my_action_success" , hide_after : 300 do
208
+ async show_on : "my_action_success" , hide_after : 300 , id : 'async-page-1' do
209
209
plain "{{event.data.message}}"
210
210
end
211
- async show_on : "my_action_failure" , hide_after : 300 do
211
+ async show_on : "my_action_failure" , hide_after : 300 , id : 'async-page-2' do
212
212
plain "{{event.data.message}}"
213
213
end
214
214
end
@@ -251,7 +251,7 @@ def response
251
251
def action_config
252
252
return {
253
253
method : :post ,
254
- path : :failure_action_test_path ,
254
+ path : :failure_action_action_test_path ,
255
255
failure : {
256
256
emit : "my_action_failure" ,
257
257
transition : {
@@ -308,10 +308,10 @@ def response
308
308
main do
309
309
page_content
310
310
end
311
- async show_on : "my_action_success" , hide_after : 300 do
311
+ async show_on : "my_action_success" , hide_after : 300 , id : 'async-page-1' do
312
312
plain "{{event.data.message}}"
313
313
end
314
- async show_on : "my_action_failure" , hide_after : 300 do
314
+ async show_on : "my_action_failure" , hide_after : 300 , id : 'async-page-2' do
315
315
plain "{{event.data.message}}"
316
316
end
317
317
end
@@ -354,7 +354,7 @@ def response
354
354
def action_config
355
355
return {
356
356
method : :post ,
357
- path : :failure_action_test_path ,
357
+ path : :failure_action_action_test_path ,
358
358
failure : {
359
359
emit : "my_action_failure" ,
360
360
redirect : {
@@ -432,10 +432,10 @@ def response
432
432
main do
433
433
page_content
434
434
end
435
- async show_on : "my_action_success" , hide_after : 300 do
435
+ async show_on : "my_action_success" , hide_after : 300 , id : 'async-app-1' do
436
436
plain "{{event.data.message}}"
437
437
end
438
- async show_on : "my_action_failure" , hide_after : 300 do
438
+ async show_on : "my_action_failure" , hide_after : 300 , id : 'async-app-2' do
439
439
plain "{{event.data.message}}"
440
440
end
441
441
end
@@ -550,7 +550,7 @@ def response
550
550
action action_config do
551
551
button text : "Click me!"
552
552
end
553
- async show_on : "my_action_success" , hide_after : 300 do
553
+ async show_on : "my_action_success" , hide_after : 300 , id : 'async-page' do
554
554
plain "Well done!"
555
555
end
556
556
end
@@ -603,7 +603,7 @@ def response
603
603
action action_config do
604
604
button text : "Click me!"
605
605
end
606
- async show_on : "my_action_success" , hide_after : 300 do
606
+ async show_on : "my_action_success" , hide_after : 300 , id : 'async-page' do
607
607
plain "Well done!"
608
608
end
609
609
end
0 commit comments