@@ -88,12 +88,12 @@ def setup_collection_routes(router, options:)
8888 )
8989
9090 # Index
91- actions = options [ :only ]
92- if !actions || actions . include? ( :index ) || actions . include? ( 'index' )
91+ if options [ :only ] . include? ( :index ) || options [ :only ] . include? ( 'index' )
9392 router . is do
93+ context . actions = custom_actions
9494 context . request = request
9595 index_action = TinyAdmin ::Actions ::Index . new
96- render_page index_action . call ( app : self , context : context , options : action_options , actions : custom_actions )
96+ render_page index_action . call ( app : self , context : context , options : action_options )
9797 end
9898 end
9999 end
@@ -114,12 +114,12 @@ def setup_member_routes(router, options:)
114114 )
115115
116116 # Show
117- actions = options [ :only ]
118- if !actions || actions . include? ( :show ) || actions . include? ( 'show' )
117+ if options [ :only ] . include? ( :show ) || options [ :only ] . include? ( 'show' )
119118 router . is do
119+ context . actions = custom_actions
120120 context . request = request
121121 show_action = TinyAdmin ::Actions ::Show . new
122- render_page show_action . call ( app : self , context : context , options : action_options , actions : custom_actions )
122+ render_page show_action . call ( app : self , context : context , options : action_options )
123123 end
124124 end
125125 end
@@ -132,6 +132,7 @@ def setup_custom_actions(router, custom_actions, repository:, options:)
132132 action_class = action . is_a? ( String ) ? Object . const_get ( action ) : action
133133
134134 router . get action_slug . to_s do
135+ context . actions = { }
135136 context . request = request
136137 custom_action = action_class . new
137138 render_page custom_action . call ( app : self , context : context , options : options )
0 commit comments