Hoolala...!! (Everything ok... but my way...)
I put that in ApplicationHelper:
def render_as(par)
# ....... in ApplicationHelper
# Usage:
# Where you had : <%= render :active_scaffold =>
"Demos", :constraints => {:demo => true, :fixed => true}, :label =>
"Demos" %>
# Simply put: <%= render_as :active_scaffold =>
"Demos", :constraints => {:demo => true, :fixed => true}, :label =>
"Demos" %>
# Thus in your view, you simply replace render by render_as
# We need a key to transfer to AS and to store something in the
session...
# Every time we call render_as with the same parameters, we can
use the same key, and like that, we don't have every time a new entry
in the session...
uniq = par.to_s
as_controller = par[:active_scaffold]
par.delete(:active_scaffold)
session["as:"+ uniq] = {:list => par}
# implicit: we just render list...
return render_component :controller => as_controller, :action =>
"table", :params => { :eid => uniq }
# thus we need render_component
end
Up to now, it seems to work... with little change in the original view
code.
Expert advice will still be very appreciated...
Hope it helps in the meantime,
Michel