Skip to content

Instantly share code, notes, and snippets.

@enricob
Created September 1, 2009 18:16
Show Gist options
  • Save enricob/179265 to your computer and use it in GitHub Desktop.
Save enricob/179265 to your computer and use it in GitHub Desktop.
From 5527e4093adb37915e017354b56cde22cda666bd Mon Sep 17 00:00:00 2001
From: Enrico Bianco <enricob@gmail.com>
Date: Tue, 1 Sep 2009 14:07:03 -0400
Subject: [PATCH] Remove the search conditions stored in the session when the index action is invoked on the controller.
diff --git a/lib/active_scaffold/actions/export.rb b/lib/active_scaffold/actions/export.rb
index a8f876b..126c725 100755
--- a/lib/active_scaffold/actions/export.rb
+++ b/lib/active_scaffold/actions/export.rb
@@ -11,6 +11,7 @@ module ActiveScaffold::Actions
def init_session_var
session[:search] = params[:search] if !params[:search].nil? || params[:commit] == as_('Search')
+ session[:search] = nil if action_name == "index"
end
# display the customization form or skip directly to export
--
1.6.0.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment