From 616a0d2d2ba15a7e176938ee829d60366fb6a9c2 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sun, 9 Aug 2026 13:26:23 +0200 Subject: Attach an asset to a page from the asset's own page The picker moves from assets/edit to assets/show, where the list of attached pages already is. A member route, POST assets/:id/attach_to_node, replaces the ride on #update. Supersedes the picker wiring in the previous commit; what remains of it is @attach_node in #create, the flash composition and the corrected hint. --- config/routes.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'config/routes.rb') diff --git a/config/routes.rb b/config/routes.rb index a43769e6..e123a3fe 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -26,7 +26,12 @@ Cccms::Application.routes.draw do scope '/admin' do resources :events - resources :assets + + resources :assets do + member do + post :attach_to_node + end + end resources :nodes do collection do -- cgit v1.3