@@ -90,7 +90,7 @@ def failure_test
9090
9191 Rails . application . routes . append do
9292 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)
9494 end
9595 Rails . application . reload_routes!
9696 end
@@ -101,7 +101,7 @@ def response
101101 action action_config do
102102 button text : "Click me!"
103103 end
104- async rerender_on : "my_action_success" do
104+ async rerender_on : "my_action_success" , id : 'async-page' do
105105 div id : "my-div" do
106106 plain "#{ DateTime . now . strftime ( '%Q' ) } "
107107 end
@@ -135,7 +135,7 @@ def response
135135 action action_config do
136136 button text : "Click me!"
137137 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
139139 plain "{{event.data.message}}"
140140 end
141141 end
@@ -165,18 +165,18 @@ def response
165165 action action_config do
166166 button text : "Click me!"
167167 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
169169 plain "{{event.data.message}}"
170170 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
172172 plain "{{event.data.message}}"
173173 end
174174 end
175175
176176 def action_config
177177 return {
178178 method : :post ,
179- path : :failure_action_test_path ,
179+ path : :failure_action_action_test_path ,
180180 success : {
181181 emit : "my_action_success"
182182 } ,
@@ -205,10 +205,10 @@ def response
205205 main do
206206 page_content
207207 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
209209 plain "{{event.data.message}}"
210210 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
212212 plain "{{event.data.message}}"
213213 end
214214 end
@@ -251,7 +251,7 @@ def response
251251 def action_config
252252 return {
253253 method : :post ,
254- path : :failure_action_test_path ,
254+ path : :failure_action_action_test_path ,
255255 failure : {
256256 emit : "my_action_failure" ,
257257 transition : {
@@ -308,10 +308,10 @@ def response
308308 main do
309309 page_content
310310 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
312312 plain "{{event.data.message}}"
313313 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
315315 plain "{{event.data.message}}"
316316 end
317317 end
@@ -354,7 +354,7 @@ def response
354354 def action_config
355355 return {
356356 method : :post ,
357- path : :failure_action_test_path ,
357+ path : :failure_action_action_test_path ,
358358 failure : {
359359 emit : "my_action_failure" ,
360360 redirect : {
@@ -432,10 +432,10 @@ def response
432432 main do
433433 page_content
434434 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
436436 plain "{{event.data.message}}"
437437 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
439439 plain "{{event.data.message}}"
440440 end
441441 end
@@ -550,7 +550,7 @@ def response
550550 action action_config do
551551 button text : "Click me!"
552552 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
554554 plain "Well done!"
555555 end
556556 end
@@ -603,7 +603,7 @@ def response
603603 action action_config do
604604 button text : "Click me!"
605605 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
607607 plain "Well done!"
608608 end
609609 end
0 commit comments