From 928ee26c12e91eb5e9da1f3b214c5fd07a89a072 Mon Sep 17 00:00:00 2001 From: Sergio Cambra <sergio@programatica.es> Date: Mon, 22 May 2017 15:05:29 +0200 Subject: [PATCH] different eid for embedded scaffolds w/o constraints and conditions, but different label and params --- lib/active_scaffold/extensions/action_view_rendering.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/active_scaffold/extensions/action_view_rendering.rb b/lib/active_scaffold/extensions/action_view_rendering.rb index a9701fda51..1462a38708 100644 --- a/lib/active_scaffold/extensions/action_view_rendering.rb +++ b/lib/active_scaffold/extensions/action_view_rendering.rb @@ -39,17 +39,15 @@ def render(*args, &block) options = args.first remote_controller = options[:active_scaffold] - constraints = options[:constraints] - conditions = options[:conditions] # It is important that the EID hash remains short as to not contribute # to a large session size and thus a possible cookie overflow exception # when using rails CookieStore or EncryptedCookieStore. For example, # when rendering many embedded scaffolds with constraints or conditions # on a single page. - eid = Digest::MD5.hexdigest(params[:controller] + remote_controller.to_s + constraints.to_s + conditions.to_s) + eid = Digest::MD5.hexdigest(params[:controller] + options.to_s) eid_info = {loading: true} - eid_info[:constraints] = constraints if constraints - eid_info[:conditions] = conditions if conditions + eid_info[:constraints] = options[:constraints] if options[:constraints] + eid_info[:conditions] = options[:conditions] if options[:conditions] eid_info[:label] = options[:label] if options[:label] options[:params] ||= {} options[:params].merge! :eid => eid, :embedded => eid_info